T
tine
Hello,
I created a simple axis-java-webservice by writing
1) a Server-Class (Skeleton):
package myPflanzenschutz;
public class PflanzenschutzNameServer {
public String[] getPflanzenschutzNamen()
{
String[] p = new String[3];
p[0]="erster Pflanzenschutz";
p[1]="zweiter Pflanzenschutz";
p[2]="dritter Pflanzenschutz";
return p;
}
}
2)a wsdd-file (server-config-wsdd) with the following service-tag:
<service name="Pflanzenschutz" provider="java:RPC" style="document"
use="literal">
<parameter name="className"
value="myPflanzenschutz.PflanzenschutzNameServer"/>
<parameter name="allowedMethods" value="getPflanzenschutzNamen"/>
<parameter name="scope" value="Session"/>
<operation
name="getPflanzenschutzNamen"
xmlnsperNS="http://develop2.fh-bingen.de:8080/axis/services/Pflanzenschutz"
qname="operNS:getPflanzenschutzNamen"
returnQName="operNS:getPflanzenschutzNamenReturn"
returnType="ns:ArrayOfString"
xmlns:ns="http://soapinterop.org/xsd">
</operation>
<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/"
/>
</service>
If I call the service from my Client, everything works fine. But there
is a problem using the service in Infopath:
PROBLEM:
I created a form with datasource in infopath, and choose a webservice
as datasource. After that I choose, that the webservice only retrieves
data (not sends data). After that, Infopath asks me about the adress
of the datasource/webservice:
this is
http://develop2.fh-bingen.de:8080/axis/services/Pflanzenschutz?wsdl.
After that, Infopath shows me the methods which are contained in the
webservice and tells me to choose one of them. my webservice has only
a single method "getPflanzenschutzNamen", so I choose the method.
Now the Infopath-Error occurs:
Infopath tells me: ERROR:
/schema/element[1][@name= 'getPflanzenschutzNamenReturn']
xsd-type: '{http://soapinterop.org/xsd}ArrayOfString' is not declared
Now my questions:
- is there an error in my wsdd-file?? I think there is not, because my
own client (java-client, not infopath) works fine
- or is infopath not able to receive string-arrays or other complex
datatypes?
thanks for help!
tine
I created a simple axis-java-webservice by writing
1) a Server-Class (Skeleton):
package myPflanzenschutz;
public class PflanzenschutzNameServer {
public String[] getPflanzenschutzNamen()
{
String[] p = new String[3];
p[0]="erster Pflanzenschutz";
p[1]="zweiter Pflanzenschutz";
p[2]="dritter Pflanzenschutz";
return p;
}
}
2)a wsdd-file (server-config-wsdd) with the following service-tag:
<service name="Pflanzenschutz" provider="java:RPC" style="document"
use="literal">
<parameter name="className"
value="myPflanzenschutz.PflanzenschutzNameServer"/>
<parameter name="allowedMethods" value="getPflanzenschutzNamen"/>
<parameter name="scope" value="Session"/>
<operation
name="getPflanzenschutzNamen"
xmlnsperNS="http://develop2.fh-bingen.de:8080/axis/services/Pflanzenschutz"
qname="operNS:getPflanzenschutzNamen"
returnQName="operNS:getPflanzenschutzNamenReturn"
returnType="ns:ArrayOfString"
xmlns:ns="http://soapinterop.org/xsd">
</operation>
<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/"
/>
</service>
If I call the service from my Client, everything works fine. But there
is a problem using the service in Infopath:
PROBLEM:
I created a form with datasource in infopath, and choose a webservice
as datasource. After that I choose, that the webservice only retrieves
data (not sends data). After that, Infopath asks me about the adress
of the datasource/webservice:
this is
http://develop2.fh-bingen.de:8080/axis/services/Pflanzenschutz?wsdl.
After that, Infopath shows me the methods which are contained in the
webservice and tells me to choose one of them. my webservice has only
a single method "getPflanzenschutzNamen", so I choose the method.
Now the Infopath-Error occurs:
Infopath tells me: ERROR:
/schema/element[1][@name= 'getPflanzenschutzNamenReturn']
xsd-type: '{http://soapinterop.org/xsd}ArrayOfString' is not declared
Now my questions:
- is there an error in my wsdd-file?? I think there is not, because my
own client (java-client, not infopath) works fine
- or is infopath not able to receive string-arrays or other complex
datatypes?
thanks for help!
tine