Problem mit Java Webservice - SOAPBinding.Style - Wrapper class fehlt

Status
Nicht offen für weitere Antworten.

copter

Mitglied
Hi,

ich habe folgende Webservice Klasse:

Java:
package main.net.webservice;
import java.io.StringReader;

import javax.jws.*;
import javax.jws.soap.*;

import org.jdom.Document;
import org.jdom.input.SAXBuilder;


@WebService(name="ToggleSwitch", serviceName="ToggleSwitchWS", targetNamespace = "http://www.Switch.de")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT)
public class ToggleSwitchWS {
	
	private String m_pathToXmlSchema;
	private main.Processor m_processor;
	
	public ToggleSwitchWS(main.Processor processor, String pathToXmlSchema)
	{
		m_processor = processor;
		m_pathToXmlSchema = pathToXmlSchema;
	}
	

	/**
	 * Initializes the processor and the simulation
	 * @param xmldoc XML switch description
	 */
	@WebMethod
	public void Create(String xmldoc)
	{
		Document new_xmldoc = convertStringToXmldoc(xmldoc);
		
		if (new_xmldoc != null)	m_processor.setXmldocOld(new_xmldoc);
		
	}
	
	/**
	 * Returns the XML description of the switch(es) including the current status
	 * @return XML switch description
	 */
	@WebMethod
	public String Read()
	{
			
		return "";
	}
...

Wenn ich das so wie es jetzt da steht kompilieren möchte erhalte ich folgende Fehlermeldung/Exception:

Java:
Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class main.net.webservice.jaxws.Read is not found. Have you run APT to generate them?
	at com.sun.xml.internal.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:256)
	at com.sun.xml.internal.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:567)
	at com.sun.xml.internal.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:514)
	at com.sun.xml.internal.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:341)
	at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:227)
	at com.sun.xml.internal.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:308)
	at com.sun.xml.internal.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:174)
	at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:420)
	at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:439)
	at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:208)
	at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:138)
	at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:92)
	at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
	at Program.startWebserver(Program.java:35)
	at Program.main(Program.java:25)

Wenn ich nun den SOAPBindingStyle auf
Java:
style=SOAPBinding.Style.RPC
setze, geht alles wunderbar. Nur möchte ich gerne den Document style nutzen.

Kann mir da jemand helfen. Brauch ich für Style.Document noch eine bestimmte Bibliothek?

Als IDE nutze ich Eclipse 3.4.2 mit Java EE 5 SDK.

Danke schonmal
 
Hallo,

ich habe genau das gleiche Problem. Ich möchte nämlich einen Webservice über ein Midelt vom Handy aufrufen.
Der Stub Generator akzeptiert nur Document/Literal.

Hast Du schon eine Lösung gefunden ?

Gruß
navino
 
Status
Nicht offen für weitere Antworten.

Zurück
Oben