axis 1.3 empty arrays

2006-01-08 Thread stefan freyhult
Hi!  I am currently experiencing problems with Axis 1.3. It seems that 1.3 does not handle arrays properly when used in conjuction with .Net.
Code that works fine with Axis 1.2.1 returns empty arrays in when usedwith a .Net client, the code does however work fine when the service is consumed by java clients. This is a major flaw, has this been looked into? 
 Thanks,  Stefan 


Custom Serializer

2006-01-08 Thread Todd Orr
Does anyone know of any tutorials on custom serialization? I've been hacking through the BeanSerializer, but my results are not encouraging. Thanks.-T


Re: web service style

2006-01-08 Thread Dink
Hi Dies,

I have noticed your answer does not include the Message style and the most
confusing thing is about it. I can not realize what the message
style means since it is not defined in WSDL spec.  Can you point me some
directions or any document? Besides, I have found the axis user
guide define the service provider can be either RPC or MSG. However, there
is no clear definition of RPC and MSG in the axis user guide.
Do the MSG mean the service style is Message described above? Is there any
relationship between service provider and use/style?

Thanks for your reply,
Dink Lo

Dies wrote:
 Hello Dink,

 The JAX-RPC 1.1 spec describes the wrapped style briefly. It is a
 variation of Document/literal, and is the recommended style/use to use.

 With Axis, you have:
 Document/literal(wrapped): -s WRAPPED -y literal
 Document/literal: -s DOCUMENT -y literal
 RPC/literal: -s RPC -y literal
 RPC/encoded: -s RPC -y encoded

 I have never seen Document/encoded, maybe Axis doesn't even support it.

 #In case of Document/literal(wrapped), the WSDL says style=document,
 but SOAP engines use some criteria to recognize that they are wrapped.
 The WSDD says wrapped if it recognized a Document/literal port as
 being Document/literal(wrapped).

 Regards,
 Dies



Re: Re: Deserialization(?) Error on String Array

2006-01-08 Thread chinmoy chakraborty

 
hii,

im not an expert, but just add following custome serializer and deserializer like following, i guess it'll work.

public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType)
  {
return new BeanSerializer(_javaType, _xmlType, typeDesc);
  }

  public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType)
  {
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
  }

private static TypeDesc typeDesc;




On Sat, 07 Jan 2006 iksrazal wrote :
Shelli,

I'm not a big fan of soap encoded arrays, but I used to use them alot and I
may be able to help. Doc / Lit is the way things are going. Nevertheless, try
posting your original wsdl, and mention where you want to put your String
array. Chances are though, your wsdl may be fine.

Your Deserialization Error may just mean that your client can't find the wsdl
or its mapping. It can be a tricky problem. Try searching for
org.apache.axis.encoding.ser.BeanSerializerFactory and
org.apache.axis.encoding.ser.BeanDeserializerFactory .

HTH,
iksrazal

Em Sexta 06 Janeiro 2006 21:09, o Shelli D. Orton escreveu:
  I should have mentioned in the original post, that with the second WSDL,
  there is no SOCArray class. The Java methods receive/pass a String[]
  array. I was hoping by changing to that I wouldn't have the deserialization
  error I'm getting.
 
  Thanks again,
  Shelli
 
  -Original Message-
  From: Shelli D. Orton [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 06, 2006 3:57 PM
  To: axis-user@ws.apache.org
  Subject: Deserialization(?) Error on String Array
 
 
  Hi,
 
  I have to make some modifications to an existing (working) webservice. We
  needed to add a new parameter to one of the existing methods, an array of
  strings. I originall created a a new type as follows in the WSDL:
 
wsdl:types
  xsd:schema
  targetNamespace=http://clearmode.com:80/ws/ConsumerProvision
   xmlns:xsd=http://www.w3.org/2001/XMLSchema
 
xsd:element name=SOCArray
  xsd:complexType
xsd:sequence
  xsd:element name=SOC type=xsd:string
  maxOccurs=unbounded/
/xsd:sequence
  /xsd:complexType
/xsd:element
 
  /xsd:schema
/wsdl:types
 
  and added it to the message definiton:
 
wsdl:message name=addRequest
  wsdl:part name=username type=xsd:string/
  wsdl:part name=password type=xsd:string/
  ...
  wsdl:part name=gender type=xsd:string/
  wsdl:part name=state type=xsd:string/
  wsdl:part name=timeZone type=xsd:string/
  wsdl:part name=SOCs element=impl:SOCArray/
/wsdl:message
 
  When I ran WSDL2Java, it created an SOCArray class. During testing of the
  modified service, I get the following error when I try to call the
  addRequest:
 
 
  Exception caught: java.lang.reflect.InvocationTargetException
  AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  faultSubcode:
  faultString: java.lang.reflect.InvocationTargetException
  faultActor:
  faultNode:
  faultDetail:
{http://xml.apache.org/axis/}hostname:localhost
 
  java.lang.reflect.InvocationTargetException
at
  org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:
 2 21)
at
  org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:1
 2 8)
at
  org.apache.axis.encoding.DeserializationContext.endElement(DeserializationC
 o ntext.java:1087)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at
  org.apache.axis.encoding.DeserializationContext.parse(DeserializationContex
 t .java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
  org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandCh
 e cker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at
  com.wmode.clearmode.applications.provisioningengine..ConsumerProvisionSoapB
 i ndingStub.add(ConsumerProvisionSoapBindingStub.java:119)
at