473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

consuming Perl ws, WDSL namespace problem

I've been tasked with consuming a Perl web service that was written by a
person in a different department of my company. The problem is it's the
guy's first attempt at web services and he doesn't know how to create the
WDSL. I created web service with Visual Studio that mimics his service and
after some tweaking of the soapAction in the WSDL I'm able to call his
service successfully. When I use SOAPScope to look the messages being sent
and received the data is there although my response objects are always null
and I think it's a namespace problem. The Perl web service seems to return a
random namespace every time. If you look at the getURLResponse node in the
XML below you see that the namespace is 'namesp4' and this is different
every time. Is there anyway to change the WSDL to accommodate this? I've
also pasted the WSDL below Any help would be greatly appreciated!

Thanks

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>

<namesp4:getURLResponse xmlns:namesp4="urn:/SOAP_URLList">

<url>

<profile xsi:type="xsd:string">custom1</profile>

<position xsi:type="xsd:int">1</position>

<action xsi:type="xsd:int">1</action>

<url xsi:type="xsd:string">http://www.ebay.com</url>

<id xsi:type="xsd:int">124</id>

<enabled xsi:type="xsd:int">1</enabled>

</url>

</namesp4:getURLResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

REQUEST:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<getURL xmlns="urn:/SOAP_URLList">

<id>124</id>

</getURL>

</soap:Body>

</soap:Envelope>

WSDL:

<?xml version="1.0" encoding="utf-8"?>

<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:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:/SOAP_URLList"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:/SOAP_URLList">

<wsdl:types>

<s:schema elementFormDefault="qualified"
targetNamespace="urn:/SOAP_URLList">

<s:element name="addURL">

<s:complexType>

<s:sequence>

<s:element minOccurs="0" maxOccurs="1"
name="profile" type="s:string"/>

<s:element minOccurs="0" maxOccurs="1"
name="url" type="s:string"/>

<s:element minOccurs="1" maxOccurs="1"
name="action" type="s:int"/>

<s:element minOccurs="1" maxOccurs="1"
name="position" type="s:int"/>

<s:element minOccurs="1" maxOccurs="1"
name="enabled" type="s:int"/>

</s:sequence>

</s:complexType>

</s:element>

<s:element name="addURLResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="1" maxOccurs="1"
name="addURLResult" type="s:int"/>

</s:sequence>

</s:complexType>

</s:element>

<s:element name="updateURL">

<s:complexType/>

</s:element>

<s:element name="updateURLResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="1" maxOccurs="1"
name="updateURLResult" type="s:int"/>

</s:sequence>

</s:complexType>

</s:element>

<s:element name="getURL">

<s:complexType>

<s:sequence>

<s:element minOccurs="1" maxOccurs="1"
name="id" type="s:int"/>

</s:sequence>

</s:complexType>

</s:element>

<s:element name="getURLResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="1" maxOccurs="1"
name="getURLResult" type="tns:url"/>

</s:sequence>

</s:complexType>

</s:element>

<s:complexType name="url">

<s:sequence>

<s:element minOccurs="0" maxOccurs="1"
name="profile" type="s:string"/>

<s:element minOccurs="0" maxOccurs="1"
name="action" type="s:string"/>

<s:element minOccurs="0" maxOccurs="1"
name="url" type="s:string"/>

<s:element minOccurs="1" maxOccurs="1"
name="id" type="s:int"/>

<s:element minOccurs="1" maxOccurs="1"
name="enabled" type="s:int"/>

</s:sequence>

</s:complexType>

<s:element name="delURL">

<s:complexType/>

</s:element>

<s:element name="delURLResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="1" maxOccurs="1"
name="delURLResult" type="s:int"/>

</s:sequence>

</s:complexType>

</s:element>

<s:element name="listURLs">

<s:complexType/>

</s:element>

<s:element name="listURLsResponse">

<s:complexType>

<s:sequence>

<s:element minOccurs="0" maxOccurs="1"
name="listURLsResult" type="tns:ArrayOfUrl"/>

</s:sequence>

</s:complexType>

</s:element>

<s:complexType name="ArrayOfUrl">

<s:sequence>

<s:element minOccurs="0" maxOccurs="unbounded"
name="url" type="tns:url"/>

</s:sequence>

</s:complexType>

</s:schema>

</wsdl:types>

<wsdl:message name="addURLSoapIn">

<wsdl:part name="parameters" element="tns:addURL"/>

</wsdl:message>

<wsdl:message name="addURLSoapOut">

<wsdl:part name="parameters" element="tns:addURLResponse"/>

</wsdl:message>

<wsdl:message name="updateURLSoapIn">

<wsdl:part name="parameters" element="tns:updateURL"/>

</wsdl:message>

<wsdl:message name="updateURLSoapOut">

<wsdl:part name="parameters" element="tns:updateURLResponse"/>

</wsdl:message>

<wsdl:message name="getURLSoapIn">

<wsdl:part name="parameters" element="tns:getURL"/>

</wsdl:message>

<wsdl:message name="getURLSoapOut">

<wsdl:part name="parameters" element="tns:getURLResponse"/>

</wsdl:message>

<wsdl:message name="delURLSoapIn">

<wsdl:part name="parameters" element="tns:delURL"/>

</wsdl:message>

<wsdl:message name="delURLSoapOut">

<wsdl:part name="parameters" element="tns:delURLResponse"/>

</wsdl:message>

<wsdl:message name="listURLsSoapIn">

<wsdl:part name="parameters" element="tns:listURLs"/>

</wsdl:message>

<wsdl:message name="listURLsSoapOut">

<wsdl:part name="parameters" element="tns:listURLsResponse"/>

</wsdl:message>

<wsdl:portType name="SOAP_URLListSoap">

<wsdl:operation name="addURL">

<wsdl:input message="tns:addURLSoapIn"/>

<wsdl:output message="tns:addURLSoapOut"/>

</wsdl:operation>

<wsdl:operation name="updateURL">

<wsdl:input message="tns:updateURLSoapIn"/>

<wsdl:output message="tns:updateURLSoapOut"/>

</wsdl:operation>

<wsdl:operation name="getURL">

<wsdl:input message="tns:getURLSoapIn"/>

<wsdl:output message="tns:getURLSoapOut"/>

</wsdl:operation>

<wsdl:operation name="delURL">

<wsdl:input message="tns:delURLSoapIn"/>

<wsdl:output message="tns:delURLSoapOut"/>

</wsdl:operation>

<wsdl:operation name="listURLs">

<wsdl:input message="tns:listURLsSoapIn"/>

<wsdl:output message="tns:listURLsSoapOut"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="SOAP_URLListSoap" type="tns:SOAP_URLListSoap">

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

<wsdl:operation name="addURL">

<soap:operation soapAction="urn:/SOAP_URLList#addURL"
style="document"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="updateURL">

<soap:operation soapAction="urn:/SOAP_URLList#updateURL"
style="document"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="getURL">

<soap:operation soapAction="urn:/SOAP_URLList#getURL"
style="document"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="delURL">

<soap:operation soapAction="urn:/SOAP_URLList#delURL"
style="document"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="listURLs">

<soap:operation soapAction="urn:/SOAP_URLList#listURLs"
style="document"/>

<wsdl:input>

<soap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<soap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="SOAP_URLList">

<documentation xmlns="http://schemas.xmlsoap.org/wsdl/"/>

<wsdl:port name="SOAP_URLListSoap"
binding="tns:SOAP_URLListSoap">

<soap:address location="http://eng-dev:9000"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

TEST CODE:

Dim ws As New SOAP_URLList.SOAP_URLList

Try

Dim url As SOAP_URLList.url = ws.getURL(124)

Dim sf As New _

Serialization.XmlSerializer(GetType(SOAP_URLList.u rl))

Dim sXML As StringWriter = _

New StringWriter(New System.Text.StringBuilder)

sf.Serialize(sXML, url)

Me.txtResponse.Text = sXML.ToString

Catch ex As SoapException

MsgBox(ex.ToString)

Me.txtResponse.Text = ex.ToString

End Try

Returns:

<?xml version="1.0" encoding="utf-16"?>

<url xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
Dec 20 '05 #1
0 2341

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bob | last post by:
I have been trying to auto generate a proxy from a WSDL file. I do this fairly regularly, so I am not a novice, but perhaps I am missing something easy. I searched on the problem, but did not...
0
by: bob | last post by:
I have been trying to auto generate a proxy from a WSDL file. I do this fairly regularly, so I am not a novice, but perhaps I am missing something easy. I searched on the problem, but did not...
5
by: MR | last post by:
I apologize in advance for re-asking a question that I posed before. I understand a little more than i did before and I am posing 2 specific questions: I need to write an application that sends...
3
by: Neter Smith | last post by:
I have run into a problem when trying to import a WSDL reference under VS 2003 and 1.1 of the framework. It appears as if it is in the generation of the proxy that things are failing. When I...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
1
by: leslie_tighe | last post by:
Hello, I have webservice created with Axis 1.2.1 and that I am trying to consuming in .NET (VB) using the Microsoft provided tools. While I am able to consume methods on the service that return...
3
by: Ben Crinion | last post by:
Hi im having a few problems consuming a SOAP::Lite web service. I think the problem is actually with the WSDL but im not sure. I have a SOAP::Lite client which works ok using the WSDL (which i...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
1
by: Paul van Brouwershaven | last post by:
Hi All, I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some simple restrictions in my WDSL file. The script are running both on the same server...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.