Dennis,
It's interesting that you mentioned the <Login> element. Leaving it out was
just a cut and paste mistake in the email, but I believe it is the problem.
The error that I am trying to correct is "There is an error in XML document
(2, 16). ---> The specified node cannot be inserted as the valid child of
this node, because the specified node is the wrong type. "
From my understand of .Net WS the (2,16) is telling me line two character
16. The 16th character in the sencond line is the "L" in </Login>. I have
tried sending longer and shorter message to get the position of </Login> to
move and every time I do the error continues to point to the "L".
So, any ideas here?
My code and the SOAP message is below.
Thanks,
Doug
MessageElement[] loginME = new MessageElement[1];
loginME[0] = new MessageElement(new Text( XML ));
LoginSSOXMLData LoginData = new LoginSSOXMLData(loginME);
LoginResponseLoginResult LoginDataResponse = new
LoginResponseLoginResult();
ServiceLocator loc = new ServiceLocator();
loc.setServiceSoapEndpointAddress("
http://127.0.0.1/SSOEnterprise/webservice/sso.asmx");
ServiceSoap port = loc.getServiceSoap();
LoginDataResponse = port.login(LoginData);
SOAP Message:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><Login<http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin>xmlns="
http://BrassRing.WebServices.SSO/"><SSOXMLData><><http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3E<>>
;
</SSOXMLData></Login></soapenv:Body></soapenv:Envelope>
On 5/20/07, Dennis Sosnoski <[EMAIL PROTECTED]> wrote:
Hi Doug,
The namespaces are the same in your two samples - the namespace
*prefixes* are different ("soapenv" vs. "soap"), but these are just
placeholders. I suspect the real issue is that your SOAP Body element is
missing the expected <Login> element.
How are you trying to call the service?
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Doug Schaible wrote:
> Good Morning,
>
> How do you change the namespace that is used by the Axis engine when
> it generates the SOAP body and envelope tags? I am trying to call a
> .Net WS and it expects <soap:Body> and <soap:Envelope>, but
> <soapenv:Body> and <soapenv:Envelope> are being created.
>
> Thanks,
> Doug
>
> Example of what is being generated:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The .Net WS is expecting this:
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
> <http://www.w3.org/2001/XMLSchema>"xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <Login xmlns=" http://BrassRing.WebServices.SSO/">
> </Login>
> </soap:Body>
> </soap:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]