I don't know if it's just another copy-and-paste artifact, but the <Login> element namespace in your .NET sample has a leading space before the "http://...";. If that space is really there, you'd need to have the space in your namespace, too. That's somewhat bizarre - namespace URIs should not start with spaces - but for most purposes namespace URIs are just compared as text strings, so all characters are significant.

Aside from that I can't offer much help. It's been a couple of years since I did anything with the original Axis, so I've lost touch with any issues.

 - 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:
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>&lt;&gt <http://brassring.webservices.sso/%22%3E%3CSSOXMLData%3E&lt;&gt>;
</SSOXMLData></Login></soapenv:Body></soapenv:Envelope>

On 5/20/07, *Dennis Sosnoski* <[EMAIL PROTECTED] <mailto:[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/
    <http://schemas.xmlsoap.org/soap/envelope/>" xmlns:xsd="
    > http://www.w3.org/2001/XMLSchema";
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    <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
    
<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]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to