You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2011/09/13 17:34:12 UTC

[jira] [Resolved] (CXF-3671) javax.xml.bind.JAXBException: xx.xxx.xxx.BATCHRESULTINPUT is not known to this context

     [ https://issues.apache.org/jira/browse/CXF-3671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3671.
------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: NeedMoreInfo)
                   Invalid
         Assignee: Daniel Kulp


Resolving as request for more information unanswered for a month.

> javax.xml.bind.JAXBException: xx.xxx.xxx.BATCHRESULTINPUT is not known to this context
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-3671
>                 URL: https://issues.apache.org/jira/browse/CXF-3671
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.3
>         Environment: JavaSE6.0, Eclipse, Weblogic10.3.3
>            Reporter: z12345678me
>            Assignee: Daniel Kulp
>            Priority: Blocker
>             Fix For: Invalid
>
>
> I tried to invoke webservice by following method:
>         DynamicClientFactory dcf = DynamicClientFactory.newInstance();
>         Client client = dcf.createClient("http://localhost:7001/bsdm/ws/BatOrdSer?wsdl");
>         xx.xxx.xxx.BATCH_RESULT_INPUT input=new xx.xxx.xxx.BATCH_RESULT_INPUT();
>         try {
> 	    Object[] ret = client.invoke("batchResult",input);
> 	} catch (Exception e) {
> 	    e.printStackTrace();
> 	}
> And I catched following exception:
>     Caused by: javax.xml.bind.JAXBException: xx.xxx.xxx.BATCHRESULTINPUT is not known to this context
> 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:625)
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:141)
> When I tried to debug the programe, I found that cxf will create webservice request and response classes at runtime in method createClient, for example:
>         2011-7-20 15:06:59 org.apache.cxf.jaxb.JAXBUtils logGeneratedClassNames
>         info : Created classes: xx.xxx.xxx.BATCHRESULTINPUT
> And an instance of JAXBContextImpl was created also. But in the JAXBContextImpl context instance class name "xx.xxx.xxx.BATCH_RESULT_INPUT" was used, which is different with "xx.xxx.xxx.BATCHRESULTINPUT".
> Then when method Client.invoke is invoked, JAXBException will be thrown. I find in class JAXBEncoderDecoder's 
>                     marshall(Marshaller marshaller, 
>                                 Object elValue, 
>                                 MessagePartInfo part,
>                                 Object source)  
> method, part's typeClass will be used. But part's typeClass is "xx.xxx.xxx.BATCHRESULTINPUT" which class is not in context.
> Following is one piece of WSDL file:
> <wsdl:message name="batchResultRequest">
> 		<wsdl:part name="parameters" element="unibssBody:BATCH_RESULT_INPUT"/>
> 	</wsdl:message>
> This problem has blocked us, could you tell me the solution. Thanks.
> Best regards!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira