The Artima Developer Community
Sponsored Link

Web Services Forum
document/literal webservice axis complex-type:Attempted ... bad QName

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christine Spietz

Posts: 2
Nickname: tine
Registered: Nov, 2004

document/literal webservice axis complex-type:Attempted ... bad QName Posted: Nov 12, 2004 2:03 AM
Reply to this message Reply
Advertisement
Hello,

I have written the following webservice

1) server-side (Skeleton): PflanzenschutzNameServer.java
code:
________________________________________

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) einer wsdd-datei: (ausschnitt: das service-tag
code:
________________________________________

<service name="Pflanzenschutz" provider="java:RPC" style="wrapper" use="literal">
<parameter name="className" value="myPflanzenschutz.PflanzenschutzNameServer"/>
<parameter name="allowedMethods" value="getPflanzenschutzNamen"/>
<parameter name="scope" value="Session"/>
<operation
name="getPflanzenschutzNamen"
xmlns perNS="http://develop2.fh-bingen.de:8080/axis/services/myPflanzenschutz"
qname="operNS:getPflanzenschutzNamen"
returnQName="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"/>
</ service>
________________________________________


The webservice is deployd on the server and if i try to connect with my Client (Stub) to the service, everything is fine

My problem:

my webservice must be document/literal, because I don't use an own Client but a Client integrated in Infopath (Microsoft Office Tool, which must have an document(literal-webservice). This means, that the service-tag in the wsdd-file must contain the attributes
code:
________________________________________

style=“document“ und use=“literal“
________________________________________
.
I've tried it also with style=“wrapped“, but Infopath seems not to understand the wrapped-style.

If I try to deploy my webservice (wsdd-file) with
code:
________________________________________

style=“document“ und use=“literal“
________________________________________
.
axis 1.1 could not create a wsdl-file, so I can't call my service:-(
axis shows the following error if i try to view the wsdl-file on
http://localhost:8080/axis/services/Pflanzenschutz?wsdl:
code:
________________________________________

AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - Attempted to write schema for bad QName (no namespace) : getPflanzenschutzeReturn

AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultSubcode:
faultString: Attempted to write schema for bad QName (no namespace) : getPflanzenschutzeReturn
faultActor:
faultNode:
faultDetail:
________________________________________


This only happens, if my webservice-method returns a complex type like an aaray of strings (String[]). If the service returns a single String instead of an array everything seems to work fine.

Can anybody tell me, where my mistake is?

thank you for your help!!!

tine

Topic: document/literal webservice with axis and complex types Previous Topic   Next Topic Topic: Web Services

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use