473,406 Members | 2,867 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.

SOAP Help

MR
I am in dire need of help in trying to get the client code for a web
service to work. i don't have a WSDL for the service so i created my own
ASP.NET service to test with. i converted the DTD files that i was given to
xsd files and used the xsd tool to create the classes. i used those classes
to create the parameters for the web method defined as follows:

[WebMethod]

publicSchema.submitOrderBatchResponse
submitOrderBatch(Schema.submitOrderBatch sob)

{

Schema.submitOrderBatchResponse sbor = new
Schema.submitOrderBatchResponse();

return sbor;
}

The proxy code is generated as:

[System.Diagnostics.DebuggerStepThroughAttribute()]

[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Web.Services.WebServiceBindingAttribute(Nam e="OrderOperationsSoap",
Namespace="http://tempuri.org/")]

public class OrderOperations :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
/// <remarks/>

public OrderOperations() {

this.Url = "http://localhost/Emulator/Emulator.asmx";

}
/// <remarks/>

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.org/submitOrderBatch",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]

[return:
System.Xml.Serialization.XmlElementAttribute(Names pace="http://tempuri.org/submitOrderBatchResponse.xs")]

public submitOrderBatchResponse
submitOrderBatch([System.Xml.Serialization.XmlElementAttribute(Names pace="http://tempuri.org/submitOrderBatch.xs")]
submitOrderBatch sob) {

object[] results = this.Invoke("submitOrderBatch", new object[] {sob});

return ((submitOrderBatchResponse)(results[0]));



my client code works on the local host but when i go out to the real
service it fails.

i created the client in VS.NET 2003 and am referencing the web service that
i created.

I compared the logs of what i am sending to what i am supposed to send and
the SOAP headers appear to be missing some info and some of the tags are
wrong:

This is what is being sent from the proxy

<?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>

<submitOrderBatch xmlns="urn:OrderOperations">

<sob CustomerBatchID="122" xmlns="http://tempuri.org/submitOrderBatch.xs">

<Customer CustomerID="1097" OrderSource="NVL TEST CUSTOMER (CUSTOMER)" />
<Orders> . . .

This is what i should be sending in the body

<ns1:submitOrderBatch xmlns:ns1="urn:OrderOperations"

SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">

<orderBatchElement>

1) why does the first line show up? (?xml version ... etc.)

2) how can i get the correct SOAP headers?

3) how do i get the correct tags? ns1:submitOrderBatch
xmlns:ns1="urn:OrderOperations" instead of
xmlns="http://tempuri.org/submitOrderBatch.xs">

thanks very much
Nov 23 '05 #1
7 1484
Hello,

I think the problem should be that you generate the client proxy with your
web service, not the actual one, Is your actual web service an ASP.NET web
service? if so, maybe you can try wsdl.exe to generate the client code:
http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfwebservicesdescriptionlanguagetoolwsdlexe.asp

Luke
Nov 23 '05 #2
MR
that is problem. the actual site is not an ASP.NET service. it runs on an
apache server and does not have a wsdl doc. so i cannot generate the client
code. i cannot use disco.exe or wsdl.exe on that site.
i think i need to know how to set the attributes so that the SOAP message is
formatted correctly according to their requirements
"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:wL*************@TK2MSFTNGXA01.phx.gbl...
Hello,

I think the problem should be that you generate the client proxy with your
web service, not the actual one, Is your actual web service an ASP.NET web
service? if so, maybe you can try wsdl.exe to generate the client code:
http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfwebservicesdescriptionlanguagetoolwsdlexe.asp

Luke

Nov 23 '05 #3
Can you contact the owner of the web service and have them provide a WSDL
file? This should be the best solution for the issue.

Luke
Nov 23 '05 #4
MR
of course i've already tried that. it doesn't exist and thus is not
available

"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:Zm**************@TK2MSFTNGXA01.phx.gbl...
Can you contact the owner of the web service and have them provide a WSDL
file? This should be the best solution for the issue.

Luke

Nov 23 '05 #5
Hello,

Maybe you can try Soap Toolkit 3.0, it will send the soap message like:

SOAP-ENV:Envelope

Here is the link for download it:

http://www.microsoft.com/downloads/d...0DD-CEEC-4088-
9753-86F052EC8450&displaylang=en

Luke
Nov 23 '05 #6
MR
it seems that the toolkit requires a wsdl document. i don't have one and
can't get one. is there another way?

"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:Vp**************@TK2MSFTNGXA01.phx.gbl...
Hello,

Maybe you can try Soap Toolkit 3.0, it will send the soap message like:

SOAP-ENV:Envelope

Here is the link for download it:

http://www.microsoft.com/downloads/d...0DD-CEEC-4088-
9753-86F052EC8450&displaylang=en

Luke

Nov 23 '05 #7
You may try consume the remote web service with local WSDL file. Anyway, I
cannot guarantee this will be successful.

Luke
Nov 23 '05 #8

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

Similar topics

3
by: junkmail | last post by:
on a win 2k server apparantly it is saying i dont have it. or it cant find it. im using mySQL 4.1 php 4.3.x apache 3.0.53 im new to php and am doing some tutorials, but when i run the sripts...
0
by: Leonid | last post by:
Thanks a lot for your time! Here is WSDL: <?xml version="1.0" encoding="utf-8"?>
3
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the...
4
by: Jonathan [sbrodolo] | last post by:
Hi there, I am using a LOTUS/DOMINO Web Service in my ASP.Net application and I am having quite a lot of problems. I have managed to solve most of them but this one it really is giving me terrible...
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
0
by: Daniel | last post by:
Hi, I need help signing SOAP/XML. Have been stuck with this for a couple of days now. I get the following error message from the server: "The security token could not be authenticated or...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
0
by: Grzegorz Smith | last post by:
Hi All. I 'm learning ZSI to use SOAP and I desperately need help. I'm working on example from tutorial -(examples/server/send_response/ simple/wsdl/). Here are my wsdl files...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
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...
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:
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
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...

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.