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 May El-Barachi <sm...@yahoo.com> on 2003/05/27 02:05:25 UTC

array of string problem

Hi everyone:

I have an urgent question, that i tried to solve for a
while but without success.
I'm trying to set the type of a parameter that is
passed to a function call (RPC mode), as array of
string, but i can't find the correct XML mapping.
here's what i used:
call.addParameter( "addresses",
XMLType.XSD_ARRAYofSTRING, ParameterMode.IN );
But if doesn't work. Does anyone know what is the
correct XML mapping for that?

Thank you guys.

May

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: Can't find prefix error on attempting to get WSDL

Posted by Colin Sampaleanu <co...@exis.com>.
This 'breakage' appears to happen even with the attachments sample which 
ships with Axis. I have tried 1.1RC, as well as the 20030525 nightly 
drop, and both JDK 1.4.1 and 1.3.1, and get the following error when I 
try to view the WSDL for the echo service (which was deployed without 
issues):

http://localhost:8080/axis/services/urn:EchoAttachmentsService?wsdl


    AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
	WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'urn:EchoAttachmentsService'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'urn:EchoAttachmentsService'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 
 faultActor: 
 faultNode: 
 faultDetail: 

Can anybody qualify if something is really broken here, or it's just a 
config issue of some sort. Viewing wsdl from other services (both mine 
and the samples) does seem to work ok.

Regards, Colin



Colin Sampaleanu wrote:

> I am deploying a relatively simple service, which uses a method with 
> an attachment. When I try to list the WSDL, I get the following 
> inexplicable error
> -----
> AXIS error
>
> Sorry, something seems to have gone wrong... here are the details:
>
> Fault - ; nested exception is:
>    WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 
> 'urn:VerificationServerService'. Namespace prefixes must be set on the 
> Definition object using the addNamespace(...) method.:
>
> AxisFault
> faultCode: 
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix 
> for 'urn:VerificationServerService'. Namespace prefixes must be set on 
> the Definition object using the addNamespace(...) method.:
> faultActor:
> faultNode:
> faultDetail:
> -----
> The .wsdd file follows. As far as I can tell, everything is ok. Can 
> anybody shed some light on what is going on, this is actually very 
> similar to the attach sample...
>
> Regards, Colin
>
> -----
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
>    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>    xmlns:schema="http://www.w3.org/2001/XMLSchema"
>    xmlns:ns1="urn:VerificationServerService" >
>
>  <service name="VerificationServerService" provider="java:RPC">
>    
> <namespace>http://www.tira.com/verificationserver/testreport/1</namespace> 
>
>    <parameter name="className" 
> value="com.tira.vserver.VerificationServer"/>
>    <parameter name="allowedMethods" value="echo test"/>
>
>    <typeMapping
>        xmlns:ns="http://soapinterop.org/xsd"
>        qname="ns:ArrayOfstring"
>        type="java:java.lang.String[]"
>        serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
>        
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
>        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>    />
>
>    <operation name="test" returnQName="returnqname" 
> returnType="schema:string" >
>      <parameter name="jadFile" type="ns1:DataHandler" />
>      <parameter name="jarFile" type="ns1:DataHandler" />
>      <parameter name="deviceFamilies" type="tns:ArrayOfstring" 
> xmlns:tns="http://soapinterop.org/xsd"/>
>    </operation>
>
>    <typeMapping
>        
> deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory" 
>
>        languageSpecificType="java:javax.activation.DataHandler"
>    qname="ns1:DataHandler"
>        
> serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
>        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>    />
>
>  </service>
>
> </deployment>
>
> -----
>



Can't find prefix error on attempting to get WSDL

Posted by Colin Sampaleanu <co...@exis.com>.
I am deploying a relatively simple service, which uses a method with an 
attachment. When I try to list the WSDL, I get the following 
inexplicable error
-----
AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is:
    WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 
'urn:VerificationServerService'. Namespace prefixes must be set on the 
Definition object using the addNamespace(...) method.:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix 
for 'urn:VerificationServerService'. Namespace prefixes must be set on 
the Definition object using the addNamespace(...) method.:
 faultActor:
 faultNode:
 faultDetail:
-----
The .wsdd file follows. As far as I can tell, everything is ok. Can 
anybody shed some light on what is going on, this is actually very 
similar to the attach sample...

Regards, Colin

-----
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
    xmlns:schema="http://www.w3.org/2001/XMLSchema"
    xmlns:ns1="urn:VerificationServerService" >

  <service name="VerificationServerService" provider="java:RPC">
    
<namespace>http://www.tira.com/verificationserver/testreport/1</namespace>
    <parameter name="className" 
value="com.tira.vserver.VerificationServer"/>
    <parameter name="allowedMethods" value="echo test"/>

    <typeMapping
        xmlns:ns="http://soapinterop.org/xsd"
        qname="ns:ArrayOfstring"
        type="java:java.lang.String[]"
        serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
        deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    />

    <operation name="test" returnQName="returnqname" 
returnType="schema:string" >
      <parameter name="jadFile" type="ns1:DataHandler" />
      <parameter name="jarFile" type="ns1:DataHandler" />
      <parameter name="deviceFamilies" type="tns:ArrayOfstring" 
xmlns:tns="http://soapinterop.org/xsd"/>
    </operation>

    <typeMapping
        
deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
        languageSpecificType="java:javax.activation.DataHandler"
    qname="ns1:DataHandler"
        
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    />

  </service>

</deployment>

-----


Re: array of string problem

Posted by Venkatesh Kancharla <ve...@strandgenomics.com>.
try XMLType.SOAP_ARRAY. 

call.addParameter("addresses",XMLType.SOAP_ARRAY,ParameterMode.IN);

Venkatesh Kancharla
Associate (Software)
Strand Genomics (http://www.strandgenomics.com)
Bangalore, India

Ph no: 3618992,93, 94, 95 (ext-210)

---------------------------------------------------------------------
      If Necessity Is the Mother of Invention, 
         then frustration Is Its Father
	                 		-unknown
---------------------------------------------------------------------

On Mon, 26 May 2003, May El-Barachi wrote:

> Hi everyone:
> 
> I have an urgent question, that i tried to solve for a
> while but without success.
> I'm trying to set the type of a parameter that is
> passed to a function call (RPC mode), as array of
> string, but i can't find the correct XML mapping.
> here's what i used:
> call.addParameter( "addresses",
> XMLType.XSD_ARRAYofSTRING, ParameterMode.IN );
> But if doesn't work. Does anyone know what is the
> correct XML mapping for that?
> 
> Thank you guys.
> 
> May
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>