473,414 Members | 1,776 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,414 software developers and data experts.

Problem with calling .Net Web Service. XML provided. Anyone help?

Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="https://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="https://mysite.com/mydir/WebService/"
xmlns:types="https://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetMessage>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Server was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;MerchantResponse
xmlns=''&amp;gt; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart
Nov 23 '05 #1
2 2671
Any takers?
wi**************@yahoo.com.au (Stewart) wrote in message news:<3e**************************@posting.google. com>...
Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="https://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="https://mysite.com/mydir/WebService/"
xmlns:types="https://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetMessage>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Server was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;MerchantResponse
xmlns=''&amp;gt; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart

Nov 23 '05 #2
DC
I can see that the request generated by PHP is not wrapping the <MyFunction>
element in a <GetMessage> element.

That looks to be the primary difference. That would account for the
rejection you are getting.

Does the nuSOAP generate stubs from WSDL ?

Also, look into WS-I BP1.0 compliant webservices, including using
document/literal. You appear to be using RPC/Encoded, which is not good for
interoperability.

-D
"Stewart" <wi**************@yahoo.com.au> wrote in message
news:3e**************************@posting.google.c om...
Any takers?
wi**************@yahoo.com.au (Stewart) wrote in message
news:<3e**************************@posting.google. com>...
Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="https://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="https://mysite.com/mydir/WebService/"
xmlns:types="https://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetMessage>
<MyFunction xsi:type="xsd:string">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Server was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;MerchantResponse
xmlns=''&amp;gt; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart

Nov 23 '05 #3

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

Similar topics

2
by: Stewart | last post by:
Hi, I'm hoping that someone will be able to help out with a problem we are having. We have a web service built in .Net 1.1. We are trying to call it from PHP4 using the NuSOAP add on. It...
0
by: Bob Davies | last post by:
Hi I have a webservice that retrieves data from a database, this is then returned to the calling client application built in windows forms within a dataset, however upon attempting to create...
5
by: joeblast | last post by:
I have a Web service that gets the financial periods and hold a reference to a disconnected dataset built at initialization. Web methods work on the dataset inside the web service. Everything is...
0
by: softwareakash | last post by:
Hi All I am using cruise control for continuous integration with clearcase for this I am using 2 build files, One for cruise control and one for nant all this is done according to the...
1
by: dcnicholls | last post by:
This is my first post to this forum: I use ASP occasionally but don't know a lot of it, and the Windows IIS was invented by MS to torture me :) So I'm not sure if this should be herre or on the IIS...
12
by: Simon | last post by:
Hi all, I'm having a baffling problem with a windows service that I'm working on. Basically, I am using a typed dataset to insert a large number of rows into an SQL Server 2005 database. But...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
5
by: Peter | last post by:
I have a webpage which creates reports, a report can take few seconds or several minutes to create. This webpage calls a web service which in turn does a remoting call to a windows service and the...
11
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know...
0
by: BornTOCode | last post by:
Hello, I am attempting to call a (Delphi) win32 DLL from a Delphi.Net webservice. I am using a slightly modified version of the hello world webservice that comes with Delphi 2006. The DLL...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.