ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » cannot get sucessful response when hitting a webservice

Post new topic  Reply to topic
 cannot get sucessful response when hitting a webservice « View previous topic :: View next topic » 
Author Message
tsmatodzi
PostPosted: Tue Jan 31, 2012 6:37 am    Post subject: cannot get sucessful response when hitting a webservice Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

I am hitting a web service hosted on windows servervia SOAP UI but this is the response I get :http:415 cannot process the message because the content type text/xml; charset utf-8 was not the expected type application/soap+xml

I am using the wsdl provided by the hosts. Anyone, please assist.


:
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 31, 2012 6:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Please provide the necessary details about your message flow.
Back to top
View user's profile Send private message
ruchir123
PostPosted: Tue Jan 31, 2012 10:19 pm    Post subject: Reply with quote

Acolyte

Joined: 04 Jan 2012
Posts: 58

Please provide more details as suggested by mqjeff.

You can check one more thing, when you are making a request in
SOAP UI, please try to validate your message structure with your WSDL in the SOAP UI request tab. It will check the validaity of your message and may solve your issue. But if you still face issue , then please provide more details.
Back to top
View user's profile Send private message
tsmatodzi
PostPosted: Tue Jan 31, 2012 11:21 pm    Post subject: Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

the input message validates successfully againt the wsdl(on SOAP UI). the input message is:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:GetInvoices>
<!--Optional:-->
<tem:invoiceDate>2011-05-17</tem:invoiceDate>
</tem:GetInvoices>
</soap:Body>
</soap:Envelope>

the message flow has an MQ input nodes which routes the message directly to the http request node.
Back to top
View user's profile Send private message
jlaisbett
PostPosted: Tue Jan 31, 2012 11:34 pm    Post subject: Reply with quote

Apprentice

Joined: 27 Nov 2009
Posts: 39

Are you using a HTTPRequest node or a SOAPRequest node (or something else) and what version of SOAP?

These kind of issues are normally the result of a mismatch in HTTP headers between broker and the web service you are calling.
Back to top
View user's profile Send private message
tsmatodzi
PostPosted: Tue Jan 31, 2012 11:39 pm    Post subject: Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

i am using HTTP request. what amuses me is that even if i try calling the webservice directly from SOAP UI without going via Broker I dont recieve a successful response.

wonder if i should add <?xml version="1.0"?> header at the begining of my xml??
Back to top
View user's profile Send private message
jlaisbett
PostPosted: Tue Jan 31, 2012 11:50 pm    Post subject: Reply with quote

Apprentice

Joined: 27 Nov 2009
Posts: 39

Might pay to try a SOAPRequest node instead of the HTTPRequest node as your first attempt, if you have a wsdl anyway it shouldn't be too difficult to set it up.
Back to top
View user's profile Send private message
tsmatodzi
PostPosted: Tue Jan 31, 2012 11:57 pm    Post subject: Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

i tried SOAP request a few times with no luck.

would adding this at the begining of the message make any difference:
<?xml version="1.0"?>
Back to top
View user's profile Send private message
jlaisbett
PostPosted: Wed Feb 01, 2012 12:10 am    Post subject: Reply with quote

Apprentice

Joined: 27 Nov 2009
Posts: 39

Your problem is more the need to set a HTTP header like so:

Content-Type: application/soap+xml; charset=utf-8

There are ways of doing this using the HTTPRequest node but I can't remember off the top of my head, you'll need to check the info center.
Back to top
View user's profile Send private message
tsmatodzi
PostPosted: Wed Feb 01, 2012 3:00 am    Post subject: Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

that is exactly just what I need: how do i set up this in a message flow: application/soap+xml; charset=utf-8
this is the error being thrown by the webservice
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Feb 01, 2012 3:38 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Have you tried this:

SET OutputLocalEnvironment.Destination.HTTP.Content-Type = 'application/soap+xml; charset=utf-8';

It is not mentioned in the InfoCenter, but perhaps worth trying.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Feb 01, 2012 4:16 am    Post subject: Re: cannot get sucessful response when hitting a webservice Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

tsmatodzi wrote:
i am using HTTP request.

There's an example in the Info Center that looks something like:
Code:
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/soap+xml';

Because of the hyphen, "Content-Type" needs double-quotes.

tsmatodzi wrote:
what amuses me is that even if i try calling the webservice directly from SOAP UI without going via Broker I dont recieve a successful response.

soapUI also allows for adding explicit HTTP headers to the request message. There should be a clickable 'Headers' button below the request message.
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Feb 01, 2012 6:23 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
I am using the wsdl provided by the hosts.


The SOAP Request node should automatically set the correct content type based on the WSDL used to configure the node. Is the WSDK using SOAP 1.2? If it is and you are still getting this problem, this is usually because the message you are sending into the SOAPRequest node is not in the SOAP Domain. Can you check the WSDL and check the parser used to build the input message...

Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
tsmatodzi
PostPosted: Thu Feb 02, 2012 12:31 am    Post subject: Reply with quote

Newbie

Joined: 31 Jan 2012
Posts: 6

@rekarm01 setting the content type in the esql works for MIME format, i am using XML.

@mgk i am using XMLNSC parser on the input node, I guess this should be sufficient??
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » cannot get sucessful response when hitting a webservice
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.