How about changing your code to

smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null, sd);

That's how the docs specify this should be done.  I took the other snippet from a 
sample.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.

----- Original Message ----- 
From: "Michael J Fork" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 5:08 PM
Subject: Re: Apache -> MSSOAP & Namespaces


> Asked the WAS guys what version they shipped...
> 
> Michael Fork
> [EMAIL PROTECTED]
> 
> 
> 
> 
> "Scott Nichol" <[EMAIL PROTECTED]>
> 07/30/2003 03:32 PM
> Please respond to soap-user
> 
>  
>         To:     <[EMAIL PROTECTED]>
>         cc: 
>         Subject:        Re: Apache -> MSSOAP & Namespaces
> 
> 
> 
> I think it should work with 2.3.  How did you determine the version?
> 
> Scott Nichol
> 
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> 
> ----- Original Message ----- 
> From: "Michael J Fork" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 30, 2003 3:41 PM
> Subject: Re: Apache -> MSSOAP & Namespaces
> 
> 
> > I did some digging and found that it is version 2.3  Any suggestions as 
> to 
> > why it is not working?
> > 
> > Thanks
> > 
> > Michael Fork
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> > Michael J Fork/Rochester/[EMAIL PROTECTED]
> > 07/30/2003 01:04 PM
> > Please respond to soap-user
> > 
> > 
> >         To:     [EMAIL PROTECTED]
> >         cc: 
> >         Subject:        Re: Apache -> MSSOAP & Namespaces
> > 
> > 
> > 
> > 
> > How can I tell which version of Apache SOAP it is.... 
> > 
> > Michael Fork
> > [EMAIL PROTECTED] 
> > 
> > 
> > 
> > "Scott Nichol" <[EMAIL PROTECTED]> 
> > 07/30/2003 12:40 PM 
> > Please respond to soap-user 
> > 
> >         To:        <[EMAIL PROTECTED]> 
> >         cc: 
> >         Subject:        Re: Apache -> MSSOAP & Namespaces 
> > 
> > 
> > 
> > The error is complaining about the namespace being empty, but if you 
> look 
> > at
> > 
> > <strLoginName xmlns:ns2="" xsi:type="ns2:Result">
> > 
> > there is a real underlying problem: the type of the element is 
> xsd:string, 
> > not ns2:Result.  The mapping in the line
> > 
> > smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), 
> > java.lang.String.class, null, sd);
> > 
> > is being applied to serialization as well as deserialization.  I am 
> > wondering whether WAS 4 includes a version of Apache SOAP that does not 
> > support this interop workaround.  For example, if WAS 4 has Apache SOAP 
> > 2.0, the workaround code above will not work.
> > 
> > Scott Nichol
> > 
> > Do not send e-mail directly to this e-mail address,
> > because it is filtered to accept only mail from
> > specific mail lists.
> > 
> > ----- Original Message ----- 
> > From: "Michael J Fork" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 30, 2003 11:30 AM
> > Subject: Re: Apache -> MSSOAP & Namespaces
> > 
> > 
> > > I had the following in my code already:
> > > 
> > >     Call call = new Call();
> > >     call.setSOAPTransport(soapHTTPConnection);
> > >     SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
> > > 
> > >     StringDeserializer sd = new StringDeserializer();
> > >     smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), 
> > java.lang.String.class, null, sd);
> > > 
> > >     return call;
> > > 
> > > which unfortunately didn't help :-(  Any other ideas on how to get a 
> > > namespace?
> > > 
> > > Thanks.
> > > 
> > > Michael Fork
> > > [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > > 
> > > "Scott Nichol" <[EMAIL PROTECTED]>
> > > 07/30/2003 10:18 AM
> > > Please respond to soap-user
> > > 
> > > 
> > >         To:     <[EMAIL PROTECTED]>
> > >         cc: 
> > >         Subject:        Re: Apache -> MSSOAP & Namespaces
> > > 
> > > 
> > > 
> > > My guess is that either you or WebSphere has added a type mapping to 
> > read 
> > > the result, but has not done it correctly.  It looks like a full type 
> > > mapping has been provided, rather than the element name mapping 
> > required. 
> > > It should be something like
> > > 
> > >     StringDeserializer stringDser = new StringDeserializer();
> > >     smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), 
> > > String.class, null, stringDser);
> > > 
> > > Note that the serializer is specified as null, indicating that this is 
> 
> > > just for mapping an element to a Java class through a particular 
> > > deserializer.
> > > Scott Nichol
> > > 
> > > Do not send e-mail directly to this e-mail address,
> > > because it is filtered to accept only mail from
> > > specific mail lists.
> > > 
> > > ----- Original Message ----- 
> > > From: "Michael J Fork" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, July 30, 2003 12:41 AM
> > > Subject: Apache -> MSSOAP & Namespaces
> > > 
> > > 
> > > > All,
> > > > 
> > > > I am trying to connect to MSSOAP 3.0 from the Apache Soap shipped 
> with 
> > 
> > > IBM 
> > > > WebSphere Application Server 4.0 (not sure of version), and am 
> getting 
> > 
> > > the 
> > > > following error:
> > > > 
> > > > Server:XML Parser failed at linenumber 5, lineposition 36, reason 
> is: 
> > > Only 
> > > > a default namespace can have an empty URI.
> > > > 
> > > > The request that was sent:
> > > > 
> > > > POST http://XXXXX/XXXX/XXXXXXXXX.wsdl HTTP/1.0
> > > > Host: XXXXX
> > > > Content-Type: text/xml; charset=utf-8
> > > > Content-Length: 699
> > > > SOAPAction: "http://xxxxxx/xxxxxx/xxxxxx/xxxxxx.Login";
> > > > 
> > > > <?xml version='1.0' encoding='UTF-8'?>
> > > > <SOAP-ENV:Envelope 
> > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> > > > <SOAP-ENV:Body>
> > > > <ns1:Login xmlns:ns1="http://tempuri.org/test2/message/"; 
> > > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> > > > <strLoginName xmlns:ns2="" 
> > xsi:type="ns2:Result">xxxxxxx</strLoginName>
> > > > <strPassword xmlns:ns3="" 
> > xsi:type="ns3:Result">xxxxxxxxx</strPassword>
> > > > </ns1:Login>
> > > > </SOAP-ENV:Body>
> > > > </SOAP-ENV:Envelope>
> > > > 
> > > > It does not like xmlns:ns2="" -- how do I specify a value for the 
> > > > namespace?  The code creating the call is generated by WSAD and is:
> > > > 
> > > >     Vector params = new Vector();
> > > >     Parameter strLoginNameParam = new Parameter("strLoginName", 
> > > java.lang.String.class, strLoginName, Constants.NS_URI_SOAP_ENC);
> > > >     params.addElement(strLoginNameParam);
> > > >     Parameter strPasswordParam = new Parameter("strPassword", 
> > > java.lang.String.class, strPassword, Constants.NS_URI_SOAP_ENC);
> > > >     params.addElement(strPasswordParam);
> > > >     call.setParams(params);
> > > > 
> > > >     Response resp = call.invoke(getURL(), SOAPActionURI);
> > > > 
> > > > Thanks.
> > > > 
> > > > Michael Fork
> > > > [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
>

Reply via email to