[jboss-jira] [JBoss JIRA] Commented: (JBXB-97) org.w3c.dom.Element is being mapped incorrectly
Alexey Loubyansky (JIRA)
jira-events at lists.jboss.org
Tue Mar 6 10:24:22 EST 2007
[ http://jira.jboss.com/jira/browse/JBXB-97?page=comments#action_12355124 ]
Alexey Loubyansky commented on JBXB-97:
---------------------------------------
The client fails for me with the following exception:
Exception in thread "main" java.rmi.RemoteException: Call invocation failed; nested exception is:
org.jboss.ws.WSException: Cannot find configFile: META-INF/standard-jaxrpc-client-config.xml
at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:522)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:273)
at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
at $Proxy0.processRequest(Unknown Source)
at org.jboss.xml.binding.WSTestClient.main(WSTestClient.java:48)
Caused by: org.jboss.ws.WSException: Cannot find configFile: META-INF/standard-jaxrpc-client-config.xml
at org.jboss.ws.metadata.config.JBossWSConfigFactory.filenameToURL(JBossWSConfigFactory.java:179)
at org.jboss.ws.metadata.config.JBossWSConfigFactory.getConfig(JBossWSConfigFactory.java:133)
at org.jboss.ws.metadata.umdm.EndpointMetaData.initEndpointConfig(EndpointMetaData.java:655)
at org.jboss.ws.metadata.umdm.EndpointMetaData.configure(EndpointMetaData.java:584)
at org.jboss.ws.core.CommonBindingProvider.configure(CommonBindingProvider.java:70)
at org.jboss.ws.core.CommonBindingProvider.<init>(CommonBindingProvider.java:56)
at org.jboss.ws.core.CommonClient.getCommonBindingProvider(CommonClient.java:377)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:251)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:503)
... 4 more
The client itself is
package org.jboss.xml.binding;
import java.io.File;
import java.net.URL;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.rpc.Service;
import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.jeff.test.ws.*;
public class WSTestClient
{
public static void main(String[] args) throws Exception
{
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL url = new URL("http://localhost:8080/testwebservice?wsdl");
File file = new File("e:\\temp\\testwebservice\\WEB-INF\\jaxrpc-mapping.xml");
URL mapUrl = file.toURL();//new URL("file://localhost/dev/ws/14372/src/jaxrpc-mapping.xml");
QName qname = new QName("http://webservices.jeff.com/server", "RequestProcessor");
Service service = factory.createService(url, qname, mapUrl);
MessageTestService port = (MessageTestService) service.getPort(MessageTestService.class);
//ProcessRequest request = new ProcessRequest();
RequestPackage reqPackage = new RequestPackage();
reqPackage.setAction(20);
reqPackage.setVersion(1);
DocumentBuilderFactory dbFactory = DocumentBuilderFactoryImpl.newInstance();
DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
Document document = docBuilder.newDocument();
Element root = document.createElement("test");
root.appendChild(document.createTextNode("Hello web services!"));
reqPackage.setRequest(root);
//request.setRequestPackage_1(reqPackage);
//ProcessRequestResponse response = port.processRequest(reqPackage);
//Element result = response.getResult();
Element result = port.processRequest(reqPackage);
System.out.println("Response=" + result);
}
protected static InitialContext getInitialContext() throws NamingException
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url", "localhost:1099");
return new InitialContext(env);
}
}
> org.w3c.dom.Element is being mapped incorrectly
> -----------------------------------------------
>
> Key: JBXB-97
> URL: http://jira.jboss.com/jira/browse/JBXB-97
> Project: JBoss XML Binding (JBossXB)
> Issue Type: Bug
> Affects Versions: JBossXB-1.0.0.CR7
> Reporter: David Boeren
>
> This comes from support case 14372. Customer has a webservice taking and returning an org.w3c.dom.Element type, but it appears that it is not being correctly mapped by JBossXB.
> The error message states:
> Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find read method or field for property '_value' in class org.apache.xerces.dom.ElementImpl
> Attached to the case you can find a WAR file to deploy for the service side and an Eclipse project with a client that demonstrates the error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list