Snippet of code below should read...

QName qn = new QName("CMCase", "ArrayOfCase");
call.registerTypeMapping(Case[].class, qn,
  new org.apache.axis.encoding.ser.ArraySerializerFactory(),        
  new org.apache.axis.encoding.ser.ArrayDeserializerFactory());     
call.setReturnType(qn);

... and of course call is a properly initialized instance of
org.apache.axis.client.Call.

-BWD.


-----Original Message-----
From: Brian Drake 
Sent: Wednesday, July 28, 2004 9:37 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Microsoft Reporting Services sessioning /
SimpleSessionHandler


Brian,

It looks like you're not specifying a deserializer for your CatalogItems array.
I'm pretty new with Axis myself, but I've done something quite similar to what
it appears you're trying to do, and I've run into the same exception a couple
times.

Try putting a bit of code similar to this under the <service> tag in your
wsdd...

    <typeMapping qname="myNS:ArrayOfCase" xmlns:myNS="CMCase" 
                 type="java:com.ghx.caseManagement.model.cases.Case[]"
                 serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
                 deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"/>

In this case, <typeMapping> is a generalized version of <beanMapping>.  The
org.apache.axis.encoding.ser.* classes are a bunch of serializers and deserializers.
You can pick the one that makes the most sense (BeanSerializerFactory, for example,
if you're passing beans to your service, which is a pretty common approach).  In 
the above case, of course, I am passing an array.  Change the namespace (myNS)
to your service name ("ReportingServiceSoap").

In the example above, I am returning the array from the service method.  So I
need to put something in my delegate (client) code to handle it as well...

      call.registerTypeMapping(Case[].class, qn,
          new org.apache.axis.encoding.ser.ArraySerializerFactory(),        
          new org.apache.axis.encoding.ser.ArrayDeserializerFactory());     
      call.setReturnType(qn); 

Give that a whirl and see what shakes out.

-BWD.

-----Original Message-----
From: Brian Freeman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 9:17 PM
To: Axis-User (E-mail)
Subject: Microsoft Reporting Services sessioning / SimpleSessionHandler


Hi all!

I'm new to Axis and have been working with getting a Microsoft Reporting Services 
client working. I've gotten through our NTML authentication issues with talking to 
Reporting Services and am stuck on getting the sessioning operational.

Several threads I've seen refer to using SimpleSessionHandler and I've added the 
following to client-config.wsdd


  <handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
  <service name="ReportingServiceSoap" provider="java:RPC" style="rpc" use="encoded">
      <requestFlow>
        <handler type="session"/>
      </requestFlow>
      <responseFlow>
        <handler type="session"/>
      </responseFlow>
      <parameter name="wsdlTargetNamespace" 
value="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"/>
      <parameter name="wsdlServiceElement"  value="ReportingService"/>
      <parameter name="wsdlServicePort"     value="ReportingServiceSoap"/>
      <parameter name="className"           
value="com.microsoft.schemas.sqlserver._2003._12.reporting.reportingservices.ReportingServiceSoap"/>
      <parameter name="wsdlPortType"        value="ReportingServiceSoap"/>
      <parameter name="allowedMethods"      value="*"/>
      <parameter name="scope"               value="Session"/>
  </service>

but I'm getting faults on code that was previously working and obviously don't have 
the above block correct. 

AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException 
faultSubcode: faultString: org.xml.sax.SAXException: Deserializing parameter 
&apos;CatalogItems&apos;: could not find deserializer for type 
{http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices}ArrayOfCatalogItem
 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: 
org.xml.sax.SAXException: Deserializing parameter 'CatalogItems': could not find 
deserializer for type 
{http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices}ArrayOfCatalogItem
 at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302) at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
 at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198) at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722) at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233) at 
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347) at 
org.apache.axis.client.Call.invoke(Call.java:2272) at 
org.apache.axis.client.Call.invoke(Call.java:2171) at 
org.apache.axis.client.Call.invoke(Call.java:1691) at 
com.microsoft.schemas.sqlserver._2003._12.reporting.reportingservices.ReportingServiceSoapStub.listChildren(ReportingServiceSoapStub.java:1916)
 
...

Has anyone already done this/any ideas where I can look for information about these 
wsdl* parameters and what I'm missing? 

The approach I'm on, is:
- add SimpleSessionHandler into client-config.wsdd
- add SimpleSessionHandler into my stub
- set _call.setClientHandlers() to the created SimpleSessionHandler in my client
and pray that it works ;)
Does that sound right?
Thanks,
Brian


Reply via email to