473,387 Members | 3,801 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,387 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 2666
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.