You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Daniel Morrow <dm...@maned.com> on 2005/05/05 17:10:00 UTC

trying to use the "typeMapping" tag, to fix a problem with SOAP sent from Mac OS X, 10.3

Dear list,

I'm new to Axis, but not to web-services development. I've developed  
web services clients for the Mac, which communicate to .NET based  
services. Now, I'm involved in ditching the .NET work, in favor of Axis.

Anyway, we have a few Mac clients, which send some data Base64  
encoded. So, when the data gets serialized into the SOAP packet, the  
parameter might look something like this:

<myTag xsi:type="xsd:base64">AAAA</myTag>

For some reason, Mac OS X, 10.3, claims the type is "base64", when it  
really should be "base64Binary". Why it does this, I don't know. (For  
those who are curious, 10.4, or "Tiger", does flag the parameter as a  
base64Binary)

What I'm trying to tell Axis, is that if you see a param flagged as a  
"base64", then treat it as a "base64Binary".

My guess is that I can accomplish this by adding a "typeMapping" tag  
in my "deploy.wsdd" file:

<typeMapping qname="xsd:base64"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   languageSpecificType="java:byte[]"
   serializer="org.apache.axis.encoding.ser.Base64SerializerFactory"
   deserializer="org.apache.axis.encoding.ser.Base64DeserializerFactory"
   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>

But this seems to have no effect, as I still get a SOAP-fault message  
sent back.

If anyone has done something like this, I'd really like to know how,  
as I'd like to continue to allow Mac OS X users to connect to my Web  
Service.

Thanks for any help in this regard,
-Dan.

P.S. - I'm using Eclipse 3.1M6, with the latest Web Tools, which  
includes Axis 1.1.

Re: trying to use the "typeMapping" tag, to fix a problem with SOAP sent from Mac OS X, 10.3

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
You seem to be on the right track with your type mapping.  Since your 
service was formerly on .Net and thus might have used literal encoding, 
could perhaps the type mapping's encodingStyle be wrong?

Jeff

Daniel Morrow wrote:

> The fault string that I get back is this:
>
> "org.xml.sax.SAXException: Deserializing parameter 'inPassword':   
> could not find deserializer for type {http://www.w3.org/2001/ 
> XMLSchema}base64"
>
> Don't know if that will help. Thanks for your help so far.
>
> -Dan.
>
>
> On May 5, 2005, at 12:56 PM, Jeff Greif wrote:
>
>> It's a little hard to tell without seeing the fault, but somewhere  
>> there should be an accessible declaration of the type xsd:base64,  
>> for example as a trivial restriction of xsd:base64Binary to prevent  
>> failure based on no type definition being available.  You may not  be 
>> allowed to define new types in the XML Schema namespace, so this  may 
>> be a trickier problem than it looks.
>>
>> Jeff
>>
>> Daniel Morrow wrote:
>>
>>
>>> Dear list,
>>>
>>> I'm new to Axis, but not to web-services development. I've  
>>> developed  web services clients for the Mac, which communicate  to 
>>> .NET based  services. Now, I'm involved in ditching the .NET  work, 
>>> in favor of Axis.
>>>
>>> Anyway, we have a few Mac clients, which send some data Base64   
>>> encoded. So, when the data gets serialized into the SOAP packet,  
>>> the  parameter might look something like this:
>>>
>>> <myTag xsi:type="xsd:base64">AAAA</myTag>
>>>
>>> For some reason, Mac OS X, 10.3, claims the type is "base64", when  
>>> it  really should be "base64Binary". Why it does this, I don't  
>>> know. (For  those who are curious, 10.4, or "Tiger", does flag the  
>>> parameter as a  base64Binary)
>>>
>>> What I'm trying to tell Axis, is that if you see a param flagged  as 
>>> a  "base64", then treat it as a "base64Binary".
>>>
>>> My guess is that I can accomplish this by adding a "typeMapping"  
>>> tag  in my "deploy.wsdd" file:
>>>
>>> <typeMapping qname="xsd:base64"
>>>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>   languageSpecificType="java:byte[]"
>>>   serializer="org.apache.axis.encoding.ser.Base64SerializerFactory"
>>>    
>>> deserializer="org.apache.axis.encoding.ser.Base64DeserializerFactory"
>>>   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>> />
>>>
>>> But this seems to have no effect, as I still get a SOAP-fault  
>>> message  sent back.
>>>
>>> If anyone has done something like this, I'd really like to know  
>>> how,  as I'd like to continue to allow Mac OS X users to connect  to 
>>> my Web  Service.
>>>
>>> Thanks for any help in this regard,
>>> -Dan.
>>>
>>> P.S. - I'm using Eclipse 3.1M6, with the latest Web Tools, which   
>>> includes Axis 1.1.
>>>
>>>
>>>
>>
>>
>
>
>


Re: trying to use the "typeMapping" tag, to fix a problem with SOAP sent from Mac OS X, 10.3

Posted by Daniel Morrow <dm...@maned.com>.
The fault string that I get back is this:

"org.xml.sax.SAXException: Deserializing parameter 'inPassword':   
could not find deserializer for type {http://www.w3.org/2001/ 
XMLSchema}base64"

Don't know if that will help. Thanks for your help so far.

-Dan.


On May 5, 2005, at 12:56 PM, Jeff Greif wrote:

> It's a little hard to tell without seeing the fault, but somewhere  
> there should be an accessible declaration of the type xsd:base64,  
> for example as a trivial restriction of xsd:base64Binary to prevent  
> failure based on no type definition being available.  You may not  
> be allowed to define new types in the XML Schema namespace, so this  
> may be a trickier problem than it looks.
>
> Jeff
>
> Daniel Morrow wrote:
>
>
>> Dear list,
>>
>> I'm new to Axis, but not to web-services development. I've  
>> developed  web services clients for the Mac, which communicate  
>> to .NET based  services. Now, I'm involved in ditching the .NET  
>> work, in favor of Axis.
>>
>> Anyway, we have a few Mac clients, which send some data Base64   
>> encoded. So, when the data gets serialized into the SOAP packet,  
>> the  parameter might look something like this:
>>
>> <myTag xsi:type="xsd:base64">AAAA</myTag>
>>
>> For some reason, Mac OS X, 10.3, claims the type is "base64", when  
>> it  really should be "base64Binary". Why it does this, I don't  
>> know. (For  those who are curious, 10.4, or "Tiger", does flag the  
>> parameter as a  base64Binary)
>>
>> What I'm trying to tell Axis, is that if you see a param flagged  
>> as a  "base64", then treat it as a "base64Binary".
>>
>> My guess is that I can accomplish this by adding a "typeMapping"  
>> tag  in my "deploy.wsdd" file:
>>
>> <typeMapping qname="xsd:base64"
>>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>   languageSpecificType="java:byte[]"
>>   serializer="org.apache.axis.encoding.ser.Base64SerializerFactory"
>>    
>> deserializer="org.apache.axis.encoding.ser.Base64DeserializerFactory"
>>   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> />
>>
>> But this seems to have no effect, as I still get a SOAP-fault  
>> message  sent back.
>>
>> If anyone has done something like this, I'd really like to know  
>> how,  as I'd like to continue to allow Mac OS X users to connect  
>> to my Web  Service.
>>
>> Thanks for any help in this regard,
>> -Dan.
>>
>> P.S. - I'm using Eclipse 3.1M6, with the latest Web Tools, which   
>> includes Axis 1.1.
>>
>>
>>
>
>


Re: trying to use the "typeMapping" tag, to fix a problem with SOAP sent from Mac OS X, 10.3

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
It's a little hard to tell without seeing the fault, but somewhere there 
should be an accessible declaration of the type xsd:base64, for example 
as a trivial restriction of xsd:base64Binary to prevent failure based on 
no type definition being available.  You may not be allowed to define 
new types in the XML Schema namespace, so this may be a trickier problem 
than it looks.

Jeff

Daniel Morrow wrote:

> Dear list,
>
> I'm new to Axis, but not to web-services development. I've developed  
> web services clients for the Mac, which communicate to .NET based  
> services. Now, I'm involved in ditching the .NET work, in favor of Axis.
>
> Anyway, we have a few Mac clients, which send some data Base64  
> encoded. So, when the data gets serialized into the SOAP packet, the  
> parameter might look something like this:
>
> <myTag xsi:type="xsd:base64">AAAA</myTag>
>
> For some reason, Mac OS X, 10.3, claims the type is "base64", when it  
> really should be "base64Binary". Why it does this, I don't know. (For  
> those who are curious, 10.4, or "Tiger", does flag the parameter as a  
> base64Binary)
>
> What I'm trying to tell Axis, is that if you see a param flagged as a  
> "base64", then treat it as a "base64Binary".
>
> My guess is that I can accomplish this by adding a "typeMapping" tag  
> in my "deploy.wsdd" file:
>
> <typeMapping qname="xsd:base64"
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   languageSpecificType="java:byte[]"
>   serializer="org.apache.axis.encoding.ser.Base64SerializerFactory"
>   deserializer="org.apache.axis.encoding.ser.Base64DeserializerFactory"
>   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> />
>
> But this seems to have no effect, as I still get a SOAP-fault message  
> sent back.
>
> If anyone has done something like this, I'd really like to know how,  
> as I'd like to continue to allow Mac OS X users to connect to my Web  
> Service.
>
> Thanks for any help in this regard,
> -Dan.
>
> P.S. - I'm using Eclipse 3.1M6, with the latest Web Tools, which  
> includes Axis 1.1.
>
>