XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Redha BSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Redha B
Date: 27 Jan 2006 01:54 PM
I tried to create a Web Service call based on this WSDL:

<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="HTTP://10.17.100.23:1310/RXBIDMS/DEMO" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s:element name="DEMOOP">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="DEMOOPInput" type="s0:DEMOOPIn"></s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="DEMOOPIn">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="EMPID" type="s:string"></s:element>
</s:sequence>
</s:complexType>
<s:element name="DEMOOPResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="DEMOOPResultset1" type="s0:DEMOOPOut"></s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="DEMOOPOut">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="EmpName" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="STARTDATE" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="BIRTHDATE" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="DEPARTMENT" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="JOBTITLE" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="MOBILE" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="STATUS" type="s:string"></s:element>
<s:element minOccurs="1" maxOccurs="1" nillable="true" name="ErrorMsg" type="s:string"></s:element>
</s:sequence>
</s:complexType>
<s:element name="zAuth">
<s:complexType>
<s:all>
<s:element name="UserId" type="s:string"></s:element>
</s:all>
</s:complexType>
</s:element>
<s:element name="zAuthPwd">
<s:complexType>
<s:all>
<s:element name="UserId" type="s:string"></s:element>
<s:element name="Password" type="s:string"></s:element>
</s:all>
</s:complexType>
</s:element>
</s:schema>
</types>
<message name="DEMOOPSoapIn">
<part name="parameters" element="s0:DEMOOP"></part>
<part name="zAuthpwd" element="s0:zAuthPwd"></part>
</message>
<message name="DEMOOPSoapOut">
<part name="parameters" element="s0:DEMOOPResponse"></part>
</message>
<portType name="DEMOSoap">
<operation name="DEMOOP">
<input message="s0:DEMOOPSoapIn"></input>
<output message="s0:DEMOOPSoapOut"></output>
</operation>
</portType>
<binding name="DEMOSoap" type="s0:DEMOSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="DEMOOP">
<soap:operation soapAction="HTTP://10.17.100.23:1310/RXBIDMS/DEMO/DEMOOP" style="document"></soap:operation>
<input>
<soap:body use="literal" parts="parameters"></soap:body>
<soap:header use="literal" message="s0:DEMOOPSoapIn" part="zAuthpwd"></soap:header>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="DEMO">
<port name="DEMOSoap" binding="s0:DEMOSoap">
<soap:address location="http://10.17.100.23:1310/RXBIDMS/DEMO.zws"></soap:address>
</port>
</service>
</definitions>

Stylus Studio generate a SOAP Request as:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<s0:DEMOOP xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:DEMOOPInput>
<s0:EMPID></s0:EMPID>
</s0:DEMOOPInput>
</s0:DEMOOP>
<s0:zAuthPwd xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:UserId></s0:UserId>
<s0:Password/>
</s0:zAuthPwd>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<s0:DEMOOP xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:DEMOOPInput>
<s0:EMPID/>
</s0:DEMOOPInput>
</s0:DEMOOP>
<s0:zAuthPwd xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:UserId/>
<s0:Password/>
</s0:zAuthPwd>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When I was expecting something more like that:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<s0:zAuthPwd xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:UserId></s0:UserId>
<s0:Password/>
</s0:zAuthPwd>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<s0:DEMOOP xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:DEMOOPInput>
<s0:EMPID/>
</s0:DEMOOPInput>
</s0:DEMOOP>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Is it a bug or Am I missing something?

Thanks,

Redha

Postnext
Ivan PedruzziSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Ivan Pedruzzi
Date: 27 Jan 2006 03:26 PM
Hi Redha

Thank You to report this test case.

Currently the Stylus Studio WSDL processor ignores the attribute "parts" in soap:body and "part" in soap:header.

If You can change the WSDL, do the following

Add a new message

<message name="DEMOOPHeader">
<part name="zAuthpwd" element="s0:zAuthPwd"></part>
</message>

Remove the part "zAuthpwd" from the input messsage

<message name="DEMOOPSoapIn">
<part name="parameters" element="s0:DEMOOP"></part>
</message>

Change the binding to

<soap:body use="literal" parts="parameters"/>
<soap:header use="literal" message="s0:DEMOOPHeader"/>


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Redha BSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Redha B
Date: 27 Jan 2006 03:55 PM
Thanks Ivan,

I can definitively alter manually the WSDL for Stylus Studio to generate the SOAP Request expected by the WS but, do you plan to support this WSDL layout in the new release of SS?

Postnext
Ivan PedruzziSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Ivan Pedruzzi
Date: 27 Jan 2006 07:17 PM
Redha,

The following Stylus Studio update 501i (available for end of February) will include this fix.

Thank You
Ivan Pedruzzi
Stylus Studio Team

Postnext
Redha BSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Redha B
Date: 27 Jan 2006 07:33 PM
Thanks Ivan for you quick answer.

Postnext
Redha BSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Redha B
Date: 27 Jan 2006 07:50 PM
Ivan,
Based on your recommendation I modified the WSDL and effectively I'm getting the expected SOAP Request:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<s0:zAuthPwd xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:UserId>REDHA</s0:UserId>
<s0:Password/>
</s0:zAuthPwd>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<s0:DEMOOP xmlns:s0="HTTP://10.17.100.23:1310/RXBIDMS/DEMO">
<s0:DEMOOPInput>
<s0:EMPID>0001</s0:EMPID>
</s0:DEMOOPInput>
</s0:DEMOOP>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

However, when I send the request I'm getting:

AxisFault
faultCode: server.error
faultSubcode:
faultString: Unable to find operation name in soap message
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode: server.error
faultSubcode:
faultString: Unable to find operation name in soap message
faultActor:
faultNode:
faultDetail:

Unable to find operation name in soap message
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at com.exln.stylus.webservice.AxisStub.send(AxisStub.java:133)


Unable to find operation name in soap message
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at com.exln.stylus.webservice.AxisStub.send(AxisStub.java:133)

Any idea?

I've been tested successfully this WS in .NET and Java so far.

Thanks,

Redha

Posttop
Ivan PedruzziSubject: Web Service Call: Invalid SOAP Request template created from WSDL
Author: Ivan Pedruzzi
Date: 27 Jan 2006 10:56 PM
After a private conversation with Redha, we discovered that this particular Web Service server gets upset when the SOAP request is indented.

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.