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 Linus Kamb <li...@iris.washington.edu> on 2005/08/08 21:11:05 UTC

client-config mystery - or - why would my client be loading my server class?

I seem to be having some trouble getting my client to notice and read my 
client-config.wsdd file that has a required type mapping.

I have the file available in the current working directory, and also in the root of the 
classes build tree and in the package classes directory.

Here is the mystery:

Running properly isolated, the client runs fine, invoking several methods on the server, 
until it needs to invoke the appropriate deserializer (in this case, the 
ElementDeserializer that is mapped to handle xsd:anyType) at which point it throws an 
exception saying it doesn't know how to handle xsd:anyType.

Now, what I find strange, is that if I include in the classpath the path to my server-side 
classes (no other changes), it works.  EXCEPT that I get an exception thrown saying that 
it can't find the log4j properties file it (the server codes) is expecting, which is 
reasonable.

I have tried running from ant, from a jar (with classpath in the manifest,) and from the 
command line setting the path explicitly.  Same resultes.  The file exists as I check it's 
existence explicitly in the client.

SOOO....

Why would be client be loading any server side codes?
Why would it run if it can't load them?
Why doesn't the client find my client-config.wsdd?
Can I specify at runtime (without resorting to the whole Call interface) either
   a) where to find the client-config.wsdd, or
   b) the TypeMapping to the Stub?


Thanks for any insight.


Attached is my wsdd.

Below is the exception on startup when the client is trying to load the server class.

      [java] Mon Aug 08 11:46:34 PDT 2005: UPDS: UPDS_Service static initialization.
      [java] UPDS: logging properties file: conf/upds/upds_log4j.properties
      [java] UPDS: Could not find log file: conf/upds/upds_log4j.properties
      [java] java.io.FileNotFoundException: conf/upds/upds_config.properties (No such file 
or directory)
      [java]     at java.io.FileInputStream.open(Native Method)
      [java]     at java.io.FileInputStream.<init>(FileInputStream.java:106)
      [java]     at java.io.FileInputStream.<init>(FileInputStream.java:66)
      [java]     at edu.iris.dmc.upds.UPDS_Service._ReadConfiguration(UPDS_Service.java:65)
      [java]     at edu.iris.dmc.upds.UPDS_Service.<clinit>(UPDS_Service.java:55)
      [java]     at java.lang.Class.forName0(Native Method)
      [java]     at java.lang.Class.forName(Class.java:219)
      [java]     at org.apache.axis.utils.ClassUtils$1.run(ClassUtils.java:127)
      [java]     at java.security.AccessController.doPrivileged(Native Method)
      [java]     at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:122)
      [java]     at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
      [java]     at 
org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
      [java]     at 
org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
      [java]     at 
org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:285)
      [java]     at 
org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
      [java]     at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
      [java]     at 
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
      [java]     at 
org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427)
      [java]     at 
org.apache.axis.configuration.FileProvider.getService(FileProvider.java:231)
      [java]     at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
      [java]     at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755)
      [java]     at org.apache.axis.client.Call.invoke(Call.java:2671)
      [java]     at org.apache.axis.client.Call.invoke(Call.java:2424)
      [java]     at org.apache.axis.client.Call.invoke(Call.java:2347)
      [java]     at org.apache.axis.client.Call.invoke(Call.java:1804)
      [java]     at 
edu.iris.dmc.upds.UPDS_QueryServiceSoapBindingStub.getProductTypes(UPDS_QueryServiceSoapBindingStub.java:218)
      [java]     at edu.iris.dmc.qryclient.QryPanel.qryProductsBtnActionPerformed(Unknown 
Source)

  [... swing  stuff ...]


Thanks,
Linus

Re: client-config mystery - or - why would my client be loading my server class?

Posted by Linus Kamb <li...@iris.washington.edu>.
Turns out that the client-config.wsdd was being read (I'm sure no-one is surprised by 
that) but that the <typeMapping> was in the wrong place in the file...

Why the client was loading server side codes, I still have no idea.

Linus Kamb wrote:
> I seem to be having some trouble getting my client to notice and read my 
> client-config.wsdd file that has a required type mapping.
> 
> I have the file available in the current working directory, and also in 
> the root of the classes build tree and in the package classes directory.
> 
> Here is the mystery:
> 
> Running properly isolated, the client runs fine, invoking several 
> methods on the server, until it needs to invoke the appropriate 
> deserializer (in this case, the ElementDeserializer that is mapped to 
> handle xsd:anyType) at which point it throws an exception saying it 
> doesn't know how to handle xsd:anyType.
> 
> Now, what I find strange, is that if I include in the classpath the path 
> to my server-side classes (no other changes), it works.  EXCEPT that I 
> get an exception thrown saying that it can't find the log4j properties 
> file it (the server codes) is expecting, which is reasonable.
> 
> I have tried running from ant, from a jar (with classpath in the 
> manifest,) and from the command line setting the path explicitly.  Same 
> resultes.  The file exists as I check it's existence explicitly in the 
> client.
> 
> SOOO....
> 
> Why would be client be loading any server side codes?
> Why would it run if it can't load them?
> Why doesn't the client find my client-config.wsdd?
> Can I specify at runtime (without resorting to the whole Call interface) 
> either
>   a) where to find the client-config.wsdd, or
>   b) the TypeMapping to the Stub?
> 
> 
> Thanks for any insight.
> 
> 
> Attached is my wsdd.
> 
> Below is the exception on startup when the client is trying to load the 
> server class.
> 
>      [java] Mon Aug 08 11:46:34 PDT 2005: UPDS: UPDS_Service static 
> initialization.
>      [java] UPDS: logging properties file: conf/upds/upds_log4j.properties
>      [java] UPDS: Could not find log file: conf/upds/upds_log4j.properties
>      [java] java.io.FileNotFoundException: 
> conf/upds/upds_config.properties (No such file or directory)
>      [java]     at java.io.FileInputStream.open(Native Method)
>      [java]     at java.io.FileInputStream.<init>(FileInputStream.java:106)
>      [java]     at java.io.FileInputStream.<init>(FileInputStream.java:66)
>      [java]     at 
> edu.iris.dmc.upds.UPDS_Service._ReadConfiguration(UPDS_Service.java:65)
>      [java]     at 
> edu.iris.dmc.upds.UPDS_Service.<clinit>(UPDS_Service.java:55)
>      [java]     at java.lang.Class.forName0(Native Method)
>      [java]     at java.lang.Class.forName(Class.java:219)
>      [java]     at 
> org.apache.axis.utils.ClassUtils$1.run(ClassUtils.java:127)
>      [java]     at java.security.AccessController.doPrivileged(Native 
> Method)
>      [java]     at 
> org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:122)
>      [java]     at 
> org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
>      [java]     at 
> org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428) 
> 
>      [java]     at 
> org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461) 
> 
>      [java]     at 
> org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:285) 
> 
>      [java]     at 
> org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500) 
> 
>      [java]     at 
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274) 
> 
>      [java]     at 
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260) 
> 
>      [java]     at 
> org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427) 
> 
>      [java]     at 
> org.apache.axis.configuration.FileProvider.getService(FileProvider.java:231) 
> 
>      [java]     at 
> org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
>      [java]     at 
> org.apache.axis.MessageContext.setTargetService(MessageContext.java:755)
>      [java]     at org.apache.axis.client.Call.invoke(Call.java:2671)
>      [java]     at org.apache.axis.client.Call.invoke(Call.java:2424)
>      [java]     at org.apache.axis.client.Call.invoke(Call.java:2347)
>      [java]     at org.apache.axis.client.Call.invoke(Call.java:1804)
>      [java]     at 
> edu.iris.dmc.upds.UPDS_QueryServiceSoapBindingStub.getProductTypes(UPDS_QueryServiceSoapBindingStub.java:218) 
> 
>      [java]     at 
> edu.iris.dmc.qryclient.QryPanel.qryProductsBtnActionPerformed(Unknown 
> Source)
> 
>  [... swing  stuff ...]
> 
> 
> Thanks,
> Linus
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>  <globalConfiguration>
>   <parameter name="adminPassword" value="admin"/>
>   <parameter name="enableNamespacePrefixOptimization" value="true"/>
>   <parameter name="disablePrettyXML" value="true"/>
>   <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
>   <parameter name="sendXsiTypes" value="true"/>
>   <parameter name="sendMultiRefs" value="true"/>
>   <parameter name="sendXMLDeclaration" value="true"/>
>  </globalConfiguration>
>  <service name="UPDS_QueryService" provider="java:RPC" style="wrapped" use="literal">
>   <operation returnQName="ns1:getProductTypesReturn" returnType="xsd:string" name="getProductTypes" qname="ns1:getProductTypes" soapAction="" xmlns:ns1="http://www.iris.edu/upds" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
>   <operation returnQName="ns2:getFieldListReturn" returnType="ns2:QueryParameterDescription" name="getFieldList" qname="ns2:getFieldList" soapAction="" xmlns:ns2="http://www.iris.edu/upds">
>    <parameter qname="ns2:productType" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
>   </operation>
>   <operation returnQName="ns3:getAvailableProductsReturn" returnType="ns3:ProductListing" name="getAvailableProducts" qname="ns3:getAvailableProducts" soapAction="" xmlns:ns3="http://www.iris.edu/upds">
>    <parameter qname="ns3:product" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
>    <parameter qname="ns3:queryParam" type="ns3:QueryParameter"/>
>   </operation>
>   <operation returnQName="ns4:getProductsByIdReturn" returnType="xsd:anyType" name="getProductsById" qname="ns4:getProductsById" soapAction="" xmlns:ns4="http://www.iris.edu/upds" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <parameter qname="ns4:productId" type="ns4:ProductIdentifier"/>
>   </operation>
>   <parameter name="allowedMethods" value="getProductsById getAvailableProducts getProductTypes getFieldList"/>
>   <parameter name="typeMappingVersion" value="1.2"/>
>   <parameter name="wsdlPortType" value="UPDS_Query"/>
>   <parameter name="className" value="edu.iris.dmc.upds.UPDS_QueryServer"/>
>   <parameter name="wsdlServicePort" value="UPDS_QueryService"/>
>   <parameter name="wsdlTargetNamespace" value="http://www.iris.edu/upds"/>
>   <parameter name="wsdlServiceElement" value="UPDS_QueryService"/>
>   <parameter name="schemaUnqualified" value="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.EnumSerializerFactory" deserializer="org.apache.axis.encoding.ser.EnumDeserializerFactory" type="java:edu.iris.dmc.upds.ValueComparator" qname="ns5:ValueComparator" xmlns:ns5="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" type="java:edu.iris.dmc.upds.QueryParameterDescription" qname="ns6:QueryParameterDescription" xmlns:ns6="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" type="java:edu.iris.dmc.upds.ProductIdentifier" qname="ns7:ProductIdentifier" xmlns:ns7="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" type="java:edu.iris.dmc.upds.QueryParameter" qname="ns8:QueryParameter" xmlns:ns8="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" type="java:edu.iris.dmc.upds.ProductListing" qname="ns9:ProductListing" xmlns:ns9="http://www.iris.edu/upds"/>
>   <typeMapping encodingStyle="" serializer="org.apache.axis.encoding.ser.ElementSerializerFactory" deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory" type="java:org.w3c.dom.Element" qname="xsd:anyType" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
>  </service>
>  <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>
>  <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
>  <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
> </deployment>