axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitriy (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5249) Axis2 1.6.1 generates invalid request when using JAXBRI bindings
Date Thu, 23 Feb 2012 14:10:48 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214661#comment-13214661
] 

Dmitriy commented on AXIS2-5249:
--------------------------------

The generated code produces request: 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:getPersonInfo
xmlns:ns2="https://esub.era.nih.gov/eraexchange/eSubServices" xmlns="http://types.ws.eraexchange.nih.gov/"><credential><password>NIH_GUIDE</password><dunsId>001910777</dunsId><tradingPartnerId>easy</tradingPartnerId></credential><commonsUserId>AALBERG</commonsUserId></ns2:getPersonInfo></soapenv:Body></soapenv:Envelope>


while the correct request should be like: 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:getPersonInfoElement
xmlns:ns2="http://ws.eraexchange.nih.gov/" xmlns="http://types.ws.eraexchange.nih.gov/"><credential><password>NIH_GUIDE</password><dunsId>001910777</dunsId><tradingPartnerId>easy</tradingPartnerId></credential><commonsUserId>AALBERG</commonsUserId></ns2:getPersonInfoElement></soapenv:Body></soapenv:Envelope>


The problem can be resolved by changing the generated Stub code from: 

env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), getPersonInfoElement4,
optimizeContent(new javax.xml.namespace.QName("https://esub.era.nih.gov/eraexchange/eSubServices",
"getPersonInfo")), new javax.xml.namespace.QName("https://esub.era.nih.gov/eraexchange/eSubServices",
"getPersonInfo")); 

to: 

env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), getPersonInfoElement4,
optimizeContent(new javax.xml.namespace.QName("http://ws.eraexchange.nih.gov/","getPersonInfoElement")),
new javax.xml.namespace.QName("http://ws.eraexchange.nih.gov/","getPersonInfoElement")); 

Basically, the genertaed code uses "type" namespace and name instead of "element" namespace
and name thus producing incorrect XML for the request. The organization policy prevent us
from modifying the generated code, so we are in a bind. Your help will be appreciated. 
                
> Axis2 1.6.1 generates invalid request when using JAXBRI bindings
> ----------------------------------------------------------------
>
>                 Key: AXIS2-5249
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5249
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows, Solaris
>            Reporter: Dmitriy
>         Attachments: ESubServices.wsdl, ESubServices.wsdl, ESubTest.java, build.xml
>
>
> The client generated using JAXBRI bindings creates invalid request XML with version 1.6.1.
 The same code works with Axis 2 1.5.1 using JAXBRI bindings and Axis 2 1.6.1 using ADB bindings.
> This problem seems to impact several clients for various Web Services.  All clients were
working fine with Axis 2 1.5.1.
> I will attach WSDL, test client, and code generation commands to this ticket.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message