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

Daniel Kulp updated CXF-3671:
-----------------------------

    Fix Version/s: NeedMoreInfo


I believe this is working correctly.   The BATCH_RESULT_INPUT would be the 
correct classname generated from JAXB for that type.   How are you creating the 
BATCHRESULTINPUT class?   Is there a JAXB customization file being passed in?   
If so, you would need that at runtime into the DynamicClientfactory as well.  

> 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
>            Priority: Blocker
>             Fix For: NeedMoreInfo
>
>
> 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

        

Reply via email to