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 » wmb 6.1 - calling webservices using soap request

Post new topic  Reply to topic
 wmb 6.1 - calling webservices using soap request « View previous topic :: View next topic » 
Author Message
shassey
PostPosted: Thu Dec 04, 2008 7:03 am    Post subject: wmb 6.1 - calling webservices using soap request Reply with quote

Apprentice

Joined: 25 Dec 2001
Posts: 25
Location: shassey

We are brand new to calling web services from the broker and web services in general. We have looked at the manuals and the samples and are flailing a bit. The documentation for consuming webservices and what to set in the messages is very minimal so any guidance is greatly appreciated.

1. We imported a wsdl , created a new message set, and dragged the deployable wsdl onto a flow - selected 'invoke web service from a flow',
Node type to be used is SOAP.

2. Next we added compute node to populate the soap message appropriately.

In looking at the samples gallery webservices/soap example, it does the following:

SET OutputRoot.XMLNSC.ns:submitPORequest.partNo = InputRoot.XMLNSC.OrderMessage.localElement.PartNumber;
SET OutputRoot.XMLNSC.ns:submitPORequest.partQuantity = InputRoot.XMLNSC.OrderMessage.localElement.Quantity;
etc...

We have set the MQ input node to use XMLSC parser and our compute node does the same as above
SET OutputRoot.XMLNSC.ns:RetrieveCustomerId.EmployeeId = 34822;
etc

where RetrieveCustomerId is the operation in the wsdl and EmployeeId one of the input parameters.

What happens is we get a soap fault -- this is coming out of a trace node which is wired off the fault terminal of the Soap Request node

(0x01000000:Folder):Header =
(0x01000000:Folder):Body = ( ['xmlnsc' : 0x1146d4970]
(0x01000000:Folder)http://schemas.xmlsoap.org/soap/envelope/:Fault = (
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/' (CHARACTER)
(0x03000000:PCDataField ):faultcode = 'soapenv:Client' (CHARACTER)
(0x03000000:PCDataField ):faultstring = 'WSWS3702E: Error: Could not resolve to an operation. The message contains an element named ""{ns}RetrieveCustomerId"", but this element does not match any operation of the target port.
However, the following operation(s) ( RetrieveCustomerId) have similar information but are a different style.
This difference might indicate that the client sent a rpc or wrapped document message and the server is expecting a document message.
Debug: name: services/CustomerInformationSOAP
implClass: class com.llbean.services.customer.CustomerInformationSOAPImpl


The user trace is below...

2008-12-04 09:43:49.459340 3436 UserTrace BIP2537I: Node 'ConsumeCustomerUpdateWebServiceFlow.Compute': Executing statement ''SET OutputRoot.XMLNSC.ns:RetrieveCustomerId.CustomerIdRequest.OrderEntryMethod = 1;'' at ('.ConsumeCustomerUpdateWebServiceFlow_Compute.Main', '22.3').
2008-12-04 09:43:49.459456 3436 UserTrace BIP2566I: Node 'ConsumeCustomerUpdateWebServiceFlow.Compute': Assigning value ''1'' to field / variable ''OutputRoot.XMLNSC.ns:RetrieveCustomerId.CustomerIdRequest.OrderEntryMethod''.
2008-12-04 09:43:49.459500 3436 UserTrace BIP2537I: Node 'ConsumeCustomerUpdateWebServiceFlow.Compute': Executing statement ''RETURN TRUE;'' at ('.ConsumeCustomerUpdateWebServiceFlow_Compute.Main', '36.3').
2008-12-04 09:43:49.459600 3436 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'ConsumeCustomerUpdateWebServiceFlow.Compute'.
2008-12-04 09:43:49.459704 3436 UserTrace BIP2539I: Node 'ConsumeCustomerUpdateWebServiceFlow.Trace1': Evaluating expression ''Root'' at ('', '1.3'). This resolved to ''Root''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Root' Value=NULL''.
2008-12-04 09:43:49.473992 3436 UserTrace BIP4067I: Message propagated to output terminal for trace node 'ConsumeCustomerUpdateWebServiceFlow.Trace1'.
The trace node 'ConsumeCustomerUpdateWebServiceFlow.Trace1' has received a message and is propagating it to any nodes connected to its output terminal.
No user action required.
2008-12-04 09:43:49.524128 3436 UserTrace BIP3719I: Node 'ConsumeCustomerUpdateWebServiceFlow.RetrieveCustomerId_CustomerInformation.Request' sending SOAP request via transport 'HTTP' ('mw-oaptest-lb.llbean.com') for operation 'RetrieveCustomerId' of type 'request-response'.
See subsequent messages for success or failure messages relating to this request, and for any transport-specific messages.
No action required.
2008-12-04 09:43:49.689088 3436 UserTrace BIP3720I: Node 'ConsumeCustomerUpdateWebServiceFlow.RetrieveCustomerId_CustomerInformation.Request' received a SOAP response message via transport 'HTTP' ('mw-oaptest-lb.llbean.com') for operation 'RetrieveCustomerId'.
The broker sent a SOAP request, and has received a response.
No action required.
2008-12-04 09:43:49.689428 3436 UserTrace BIP6060I: Parser type ''Properties'' created on behalf of node 'ConsumeCustomerUpdateWebServiceFlow.SALLY.WS.IN' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2008-12-04 09:43:49.689652 3436 UserTrace BIP6061I: Parser type ''SOAP'' created on behalf of node 'ConsumeCustomerUpdateWebServiceFlow.SALLY.WS.IN' to handle portion of incoming message of length '8' bytes beginning at offset '0'. Parser type selected based on value ''SOAP'' from previous parser.
2008-12-04 09:43:49.689688 3436 UserTrace BIP3903I: Node (class='ComIbmSOAPRequestNode', name='RetrieveCustomerId_CustomerInformation.Request') propagating to 'fault' terminal.
The specified node is about to propagate a message to the specified terminal.
No user action required. This is an information message.
2008-12-04 09:43:49.723352 3436 UserTrace BIP2638I: The MQ output node 'ConsumeCustomerUpdateWebServiceFlow.SALLY.WS.FAULT' attempted to write a message to queue ''SALLY.WS.FAULT'' connected to queue manager ''''. The MQCC was '0' and the MQRC was '0'.
2008-12-04 09:43:49.723384 3436 UserTrace BIP2622I: Message successfully output by output node 'ConsumeCustomerUpdateWebServiceFlow.SALLY.WS.FAULT' to queue ''SALLY.WS.FAULT'' on queue manager ''''.
2008-12-04 09:43:49.723532 3436 UserTrace BIP2539I: Node 'ConsumeCustomerUpdateWebServiceFlow.Trace': Evaluating expression ''Root'' at ('', '1.3'). This resolved to ''Root''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Root' Value=NULL''.
2008-12-04 09:43:49.725520 3436 UserTrace BIP4067I: Message propagated to output terminal for trace node




wsdl is:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://customer.services.llbean.com/CustomerInformation/v1_0/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CustomerInformation" targetNamespace="http://customer.services.llbean.com/CustomerInformation/v1_0/">
<wsdl:types>
<xsd:schema targetNamespace="http://customer.services.llbean.com/CustomerInformation/v1_0/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="EmailAddressList">
<xsd:annotation>
<xsd:documentation>
The email address list is an array of email addresses connected with the individual.
This array is unbounded, but may be empty.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="EmailAddress" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="TelephoneList">
<xsd:annotation>
<xsd:documentation>
The telephone list is an array of phone numbers connected with the individual.
This array is unbounded, but may be empty.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="TelephoneNumber" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:simpleType name="OrderEntryMethod">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="8"/>
</xsd:restriction>
</xsd:simpleType>

<xsd:element name="CustomerIdRequest">
<xsd:annotation>
<xsd:documentation>
The customer id request contains a set of information that may be used to
identify a customer:

SourceCode - Seven digit number identifying the source of the request.
Gender - The gender of the customer.
EmployeeId - The employee calling the service via the client.
OrderId - The order id associated with the customer lookup request.
OrderEntryMethod - Supplied by client as integer value based on entry path. (See type definition.)
Title - Mr, Mrs, Dr, Sir
TitleId - Domain value of title code
FirstName - Customer's first name. REQUIRED.
MiddleName - Customer's middle initial.
LastName - Customer's last name. REQUIRED.
Suffix - Jr, Sr, III
SuffixId - Domain value of suffix code
Honorific - PhD, Retd, Esq
HonorificId - Domain value of honorific code
AddressLine1 - First line of address. REQUIRED.
AddressLine2 - Second line of address.
AddressLine3 - Third line of address.
City - City of residence. REQUIRED
Jurisdiction - State or Province if USA/CAN, else prefecture, etc.
PostalCode - The postal code.
Country - Country of residence. Three letter country code.
TelephoneNumbers - A list of telephone numbers associated with the customer.
EmailAddresses - A list of email addresses associated with the customer.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="Title" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="TitleId" type="xsd:integer"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FirstName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="MiddleName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LastName" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="Suffix" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SuffixId" type="xsd:integer"/>
<xsd:element maxOccurs="1" minOccurs="0" name="Honorific" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="HonorificId" type="xsd:integer"/>
<xsd:element maxOccurs="1" minOccurs="1" name="AddressLine1" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="AddressLine2" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="AddressLine3" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="City" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="Jurisdiction" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="PostalCode" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="Country" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="TelephoneNumbers" type="tns:TelephoneList"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EmailAddresses" type="tns:EmailAddressList"/>
<xsd:element maxOccurs="1" minOccurs="0" name="Gender" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EmployeeId" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="OrderId" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="OrderEntryMethod" type="tns:OrderEntryMethod"/>
<xsd:element maxOccurs="1" minOccurs="1" name="SourceCode" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="CustomerIdResponse">
<xsd:annotation>
<xsd:documentation>
The response is the customer id determined for the
request supplied, as well as whether the request
resulted in a new customer id being generated.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CustomerId" type="xsd:string"/>
<xsd:element name="CreatedNew" type="xsd:boolean"/>
<xsd:element name="AddressId" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="ValidationFault">
<xsd:annotation>
<xsd:documentation>
Service-defined validation errors are returned as an array of string values.
All validation faults MUST contain at least one error code.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="ValidationErrors" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="CustomerServiceFault">
<xsd:annotation>
<xsd:documentation>
Handles system exceptions with a means for returning a system-defined code value.
All system faults must have one and only one error code to identify the problem.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ServiceError" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>

<wsdl:message name="CustomerIdRequestMessage">
<wsdl:part element="tns:CustomerIdRequest" name="request"/>
</wsdl:message>
<wsdl:message name="CustomerIdResponseMessage">
<wsdl:part element="tns:CustomerIdResponse" name="response"/>
</wsdl:message>
<wsdl:message name="ValidationFaultMessage">
<wsdl:part element="tns:ValidationFault" name="ValidationFault"/>
</wsdl:message>
<wsdl:message name="ServiceFaultMessage">
<wsdl:part element="tns:CustomerServiceFault" name="ServiceFault"/>
</wsdl:message>

<wsdl:portType name="CustomerInformation">
<wsdl:operation name="RetrieveCustomerId">
<wsdl:input message="tns:CustomerIdRequestMessage" name="CustomerIdRequestMessage"/>
<wsdl:output message="tns:CustomerIdResponseMessage" name="CustomerIdResponseMessage"/>
<wsdl:fault message="tns:ValidationFaultMessage" name="ValidationFaultMessage"/>
<wsdl:fault message="tns:ServiceFaultMessage" name="ServiceFaultMessage"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="CustomerInformationSOAP" type="tns:CustomerInformation">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RetrieveCustomerId">

<soap:operation soapAction="http://customer.services.llbean.com/CustomerInformation/v1_0/RetrieveCustomerId"/>
<wsdl:input name="CustomerIdRequestMessage">

<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="CustomerIdResponseMessage">

<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationFaultMessage">

<soap:fault name="ValidationFaultMessage" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ServiceFaultMessage">

<soap:fault name="ServiceFaultMessage" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="CustomerInformation">
<wsdl:port binding="tns:CustomerInformationSOAP" name="CustomerInformationSOAP">
<soap:address location="http://localhost:9080/CustomerInformationWS/services/CustomerInformationSOAP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Dec 04, 2008 8:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This is a guess, but I think your ESQL is missing a namespace declaration for 'ns'.
Try adding
Code:
DECLARE ns NAMESPACE 'http://...'

Replace ... with the correct URL, obviously
Back to top
View user's profile Send private message
shassey
PostPosted: Fri Dec 05, 2008 10:26 am    Post subject: Reply with quote

Apprentice

Joined: 25 Dec 2001
Posts: 25
Location: shassey

We discovered all we needed to do was use code assist and all the required values were beautifully available and just needed to use those.
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 » wmb 6.1 - calling webservices using soap request
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.