Otrs calling a .Net Wcf

Moderator: crythias

Post Reply
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Otrs calling a .Net Wcf

Post by MaxMaz »

Hello everyone
im getting an error in otrs webservice debugger:
Error in SOAP call: can't connect to localhost:10000(connection refused) SOAP.pm line 578

$SOAPHandle->call(@CallData); <============== line error

can you help me please?
Last edited by MaxMaz on 14 Sep 2015, 16:48, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

check back with the developer of the webservice
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

im webservice developer :)

Code: Select all

        public bool Method02([XmlElement(Namespace="")] string TicketID)
        {
            if (string.IsNullOrEmpty(TicketID))
            {
                return false;
            }

            return true;
        }
Is very simple webservice to test otrs as requester
Last edited by MaxMaz on 14 Sep 2015, 16:18, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

I can not see any OTRS code...
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

oh! what you need?????? i will paste it
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

please describe what you changed, what you expect etc
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

i created an Invoker
transport http:soap :
endpoint http://localhost:10000/Service1.svc
namespace http://www.otrs.com/GenericInterface/Method02
Invoker details:
Name Method02
Event Handler TicketCreate

Im in debugging mode but otrs cant reach my webservice

My webservice (code above) works i tested with SOAPUI
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

i got a log from webservice localhost site

Code: Select all

2015-09-14 15:57:10 ::1 POST /Service1.svc - 10000 - ::1 - - 415 0 0 1388
2015-09-14 15:57:10 ::1 POST /Service1.svc/mex - 10000 - ::1 - - 415 0 0 31
status is 415 is not good i think

hope it helps
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Otrs calling a .Net Wcf

Post by crythias »

MaxMaz wrote:im webservice developer :)

Code: Select all

        public bool Method02([XmlElement(Namespace="")] string TicketID)
        {
            if (string.IsNullOrEmpty(TicketID))
            {
                return false;
            }

            return true;
        }
Is very simple webservice to test otrs as requester
This bit of code does nothing of importance with respect to this forum topic. It certainly doesn't indicate anything calling OTRS. Nothing above indicates that the code should have any knowledge whatsoever of where OTRS exists, etc.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

MaxMaz wrote:i created an Invoker
transport http:soap :
endpoint http://localhost:10000/Service1.svc
namespace http://www.otrs.com/GenericInterface/Method02
Invoker details:
Name Method02
Event Handler TicketCreate

Im in debugging mode but otrs cant reach my webservice

My webservice (code above) works i tested with SOAPUI
Why You Say It???? Read above
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

the Namespace is not the emthod you request, what does the debugging of your webservice tell?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

jojo wrote:the Namespace is not the emthod you request, what does the debugging of your webservice tell?
Hi jojo thanks to answer me!!!!
Unfortunately otrs doesnt reach my webservice, im debugging webservice with soapui and works!!!
i will attach otrs debugger log

Code: Select all

Communication sequence started (2015-09-15 09:03:13, debug)

$VAR1 = {
  'TicketID' => '1196'
};

Outgoing data before mapping (2015-09-15 09:03:13, debug)

$VAR1 = {
  'TicketID' => '1196'
};

Outgoing data after mapping (2015-09-15 09:03:13, debug)

$VAR1 = {
  'TicketID' => '1196'
};

Error in SOAP call: 500 Can't connect to localhost:10000 (Connection refused) at /TARGET/SHARE/var/otrs/Kernel/GenericInterface/Transport/HTTP/SOAP.pm line 578 (2015-09-15 09:03:13, error)

No data provided
What is the namespace right then?
Maybe problem is that OTRS send a content-type (soap+xml) while my webservice expect other content-type (xml)?????
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

connection refused means that the port on the OTRS server is not reachable
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

jojo wrote:connection refused means that the port on the OTRS server is not reachable
You mean the webservice port? is OTRS that invoke my webservice!!!
Btw problem is otrs content type because is different to webservice's content-type

Webservice site Log shows the error status 415

Code: Select all

2015-09-14 15:57:10 ::1 POST /Service1.svc - 10000 - ::1 - - 415 0 0 1388
2015-09-14 15:57:10 ::1 POST /Service1.svc/mex - 10000 - ::1 - - 415 0 0 31
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Otrs calling a .Net Wcf

Post by jojo »

you posted
Can't connect to localhost:10000 (Connection refused)
which is a quite clear message.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

Hi sorry for my delay, i changed few parameters and finally i got a different error:

Code: Select all

cannot process the message because the content type 'text/xml'; charset='utf-8' was not expected type "application/soap+xml'; charset='utf-8'
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Otrs calling a .Net Wcf

Post by crythias »

What did you find when you searched for that?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MaxMaz
Znuny newbie
Posts: 30
Joined: 08 Sep 2015, 17:06
Znuny Version: 3.3.9

Re: Otrs calling a .Net Wcf

Post by MaxMaz »

Don't worry crythias i solved my problem
here my solution

1) changed host from localhost to normal ip adress
2) change in my webservice from soap 1.2 to 1.1

Now i got error from response

Code: Select all

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="it-IT">
...
faultstring></s:Fault></s:Body></s:Envelope>
ps. thanks to jojo
Post Reply