cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-5306) Soap body in header
Date Fri, 27 Sep 2013 17:23:03 GMT

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

Daniel Kulp updated CXF-5306:
-----------------------------

    Description: 
I am using apache-cxf-2.7.6. I generated soap client from wsdl. In Java code I set values
for the request object and send request. Soap xml request is not valid. In the header is request
body and soap:body is empty. This is generated xml which is not valid:
{code:xml}
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <ns7:MetaHeader xmlns:ns12="http://www.csob.cz/common/v1" xmlns:ns11="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/res/v1"
xmlns:ns10="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/req/v1" xmlns:ns9="http://www.csob.cz/infrastructure/SMS/v1"
xmlns:ns8="http://www.csob.cz/infrastructure/SMS/core" xmlns:ns7="http://ed6.kbc.com/metaheader.1"
xmlns:ns6="http://www.csob.cz/common/core" xmlns:ns5="http://services.csob.cz/base_v1" xmlns:ns4="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/res/v1"
xmlns:ns3="http://www.csob.cz/infrastructure/Email/v1" xmlns:ns2="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/req/v1"
xmlns="http://www.csob.cz/infrastructure/Email/core">
         <ns2:EmailToFields>
            <EmailToField>test@test.sk</EmailToField>
         </ns2:EmailToFields>
         <EmailSubject>test</EmailSubject>
         <EmailFromField>test@test.sk</EmailFromField>
         <ns2:EmailBody>Hello World!</ns2:EmailBody>
         <DeliveryPriority>1</DeliveryPriority>
      </ns7:MetaHeader>
   </soap:Header>
   <soap:Body/>
</soap:Envelope>
{code}

Here is the code how I am sending request:
{code:java}
      MessageDelivery messageDelivery = new MessageDelivery();
			SendEmailPortType client = messageDelivery.getSendEmailPortTypeBindingPort(); 

			org.apache.cxf.endpoint.Client clientEnd = ClientProxy.getClient(client);
			clientEnd.getOutInterceptors().add(new MyLogInterceptor());
			
			SendEmailReq sendEmailReq = new SendEmailReq();
			sendEmailReq.setEmailSubject("test");
			sendEmailReq.setEmailBody(body);
			sendEmailReq.setEmailFromField("test@test.sk");
			sendEmailReq.setEmailToFields(new SendEmailReq.EmailToFields());
			sendEmailReq.getEmailToFields().getEmailToField().add("test@test.sk");
			sendEmailReq.setDeliveryPriority(new Integer(1));
      
			client.sendEmailV1(sendEmailReq);
{code}


  was:
I am using apache-cxf-2.7.6. I generated soap client from wsdl. In Java code I set values
for the request object and send request. Soap xml request is not valid. In the header is request
body and soap:body is empty. This is generated xml which is not valid:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <ns7:MetaHeader xmlns:ns12="http://www.csob.cz/common/v1" xmlns:ns11="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/res/v1"
xmlns:ns10="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/req/v1" xmlns:ns9="http://www.csob.cz/infrastructure/SMS/v1"
xmlns:ns8="http://www.csob.cz/infrastructure/SMS/core" xmlns:ns7="http://ed6.kbc.com/metaheader.1"
xmlns:ns6="http://www.csob.cz/common/core" xmlns:ns5="http://services.csob.cz/base_v1" xmlns:ns4="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/res/v1"
xmlns:ns3="http://www.csob.cz/infrastructure/Email/v1" xmlns:ns2="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/req/v1"
xmlns="http://www.csob.cz/infrastructure/Email/core">
         <ns2:EmailToFields>
            <EmailToField>test@test.sk</EmailToField>
         </ns2:EmailToFields>
         <EmailSubject>test</EmailSubject>
         <EmailFromField>test@test.sk</EmailFromField>
         <ns2:EmailBody>Hello World!</ns2:EmailBody>
         <DeliveryPriority>1</DeliveryPriority>
      </ns7:MetaHeader>
   </soap:Header>
   <soap:Body/>
</soap:Envelope>

Here is the code how I am sending request:

      MessageDelivery messageDelivery = new MessageDelivery();
			SendEmailPortType client = messageDelivery.getSendEmailPortTypeBindingPort(); 

			org.apache.cxf.endpoint.Client clientEnd = ClientProxy.getClient(client);
			clientEnd.getOutInterceptors().add(new MyLogInterceptor());
			
			SendEmailReq sendEmailReq = new SendEmailReq();
			sendEmailReq.setEmailSubject("test");
			sendEmailReq.setEmailBody(body);
			sendEmailReq.setEmailFromField("test@test.sk");
			sendEmailReq.setEmailToFields(new SendEmailReq.EmailToFields());
			sendEmailReq.getEmailToFields().getEmailToField().add("test@test.sk");
			sendEmailReq.setDeliveryPriority(new Integer(1));
      
			client.sendEmailV1(sendEmailReq);

    
> Soap body in header
> -------------------
>
>                 Key: CXF-5306
>                 URL: https://issues.apache.org/jira/browse/CXF-5306
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.7.6
>            Reporter: matej
>         Attachments: MessageDelivery.wsdl
>
>
> I am using apache-cxf-2.7.6. I generated soap client from wsdl. In Java code I set values
for the request object and send request. Soap xml request is not valid. In the header is request
body and soap:body is empty. This is generated xml which is not valid:
> {code:xml}
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Header>
>       <ns7:MetaHeader xmlns:ns12="http://www.csob.cz/common/v1" xmlns:ns11="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/res/v1"
xmlns:ns10="http://www.csob.cz/infrastructure/MessageDelivery/SendSMS/req/v1" xmlns:ns9="http://www.csob.cz/infrastructure/SMS/v1"
xmlns:ns8="http://www.csob.cz/infrastructure/SMS/core" xmlns:ns7="http://ed6.kbc.com/metaheader.1"
xmlns:ns6="http://www.csob.cz/common/core" xmlns:ns5="http://services.csob.cz/base_v1" xmlns:ns4="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/res/v1"
xmlns:ns3="http://www.csob.cz/infrastructure/Email/v1" xmlns:ns2="http://www.csob.cz/infrastructure/MessageDelivery/SendEmail/req/v1"
xmlns="http://www.csob.cz/infrastructure/Email/core">
>          <ns2:EmailToFields>
>             <EmailToField>test@test.sk</EmailToField>
>          </ns2:EmailToFields>
>          <EmailSubject>test</EmailSubject>
>          <EmailFromField>test@test.sk</EmailFromField>
>          <ns2:EmailBody>Hello World!</ns2:EmailBody>
>          <DeliveryPriority>1</DeliveryPriority>
>       </ns7:MetaHeader>
>    </soap:Header>
>    <soap:Body/>
> </soap:Envelope>
> {code}
> Here is the code how I am sending request:
> {code:java}
>       MessageDelivery messageDelivery = new MessageDelivery();
> 			SendEmailPortType client = messageDelivery.getSendEmailPortTypeBindingPort(); 
> 			org.apache.cxf.endpoint.Client clientEnd = ClientProxy.getClient(client);
> 			clientEnd.getOutInterceptors().add(new MyLogInterceptor());
> 			
> 			SendEmailReq sendEmailReq = new SendEmailReq();
> 			sendEmailReq.setEmailSubject("test");
> 			sendEmailReq.setEmailBody(body);
> 			sendEmailReq.setEmailFromField("test@test.sk");
> 			sendEmailReq.setEmailToFields(new SendEmailReq.EmailToFields());
> 			sendEmailReq.getEmailToFields().getEmailToField().add("test@test.sk");
> 			sendEmailReq.setDeliveryPriority(new Integer(1));
>       
> 			client.sendEmailV1(sendEmailReq);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message