Karate Framework : How to extract the data from xml response - testautomationfx

Response :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
soap:Body
<ng3:CREATE_WORKS_ORDERS xmlns:ng3="http://www.sx3.com/CreateWorksOrdersResponse" xmlns:tns1="http://www.sx3.com/sx3returnedmessages">
ng3:WOR
ng3:WorDetails
ng3:WorSrqNo4629817</ng3:WorSrqNo>
ng3:WorSeqno1</ng3:WorSeqno>
</ng3:WorDetails>
</ng3:WOR>
tns1:MESSAGE_RETURN_INFO
tns1:SUCCESS_FLAGTRUE</tns1:SUCCESS_FLAG>
tns1:MESSAGES_EXISTTRUE</tns1:MESSAGES_EXIST>
tns1:RETURNED_MESSAGES
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="1006">
tns1:TEXTProperty is HLP, work managed by HNZC</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="1106">
tns1:TEXTBody Corporate property. Contact the asset manager for anything other than Health & Safety work.</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="2031">
tns1:TEXTThis is an HLP property</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="WAR" tns1:AREA="HEM" tns1:REFNO="85">
tns1:TEXTVariable warning(s) exist</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="1106">
tns1:TEXTBody Corporate property. Contact the asset manager for anything other than Health & Safety work.</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="1111">
tns1:TEXTThree or more work orders for the same schedule of rate have raised in the past six months.</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="1112">
tns1:TEXTA similar open work order exists. Review to ensure if a new work order should be raised.</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="VWA" tns1:AREA="VWA" tns1:REFNO="2031">
tns1:TEXTThis is an HLP property</tns1:TEXT>
</tns1:MESSAGE>
<tns1:MESSAGE tns1:TYPE="WAR" tns1:AREA="HEM" tns1:REFNO="85">
tns1:TEXTVariable warning(s) exist</tns1:TEXT>
</tns1:MESSAGE>
</tns1:RETURNED_MESSAGES>
</tns1:MESSAGE_RETURN_INFO>
</ng3:CREATE_WORKS_ORDERS>
</soap:Body>
</soap:Envelope>

Related

Plivo Inbound Sip trunk - issue with destination number

I'm trying to forward calls from few Plivo numbers to my Asterisk server. In Plivo documentation specified, that i have to build Inbound trunk application and return to plivo XML code below:
<Response>
<Dial callerId="18004321321">
<User>sip:yoda12312312#phone.plivo.com</User>
</Dial>
</Response>
But the problem is that i need to add information about destination phone number (cause i have few of them), but can't find the way to do this.
Have you tried this:
<Response>
<Dial callerId="18004321321">
<User>sip:yoda12312312#phone.plivo.com</User>
<Number>180012345678</Number>
</Dial>
</Response>

Mule ESB + RabbitMQ reliability and up-time: how to re-create a deleted exchange automatically at runtime

I've got a Large mule application that receives on multiple queues and publishes to at least one exchange. I'm manually QA'ing the application by deleting the queues and exchanges to see if mule will retry to connect (and also shut down rabbit altogether)
This question is for when an exchange is deleted. The messages go into a locked anonymous queue named something like: amq.gen-gFs6-7sP2nw1ntgobO6cBg
I'm looking for a way to reconnect the exchange and still pass through the messages. Is this even possible?
I've set options like
exchangeDurable="true"
queueDurable="true"
Is there any other things (or rabbit configs) that I need to do or would be beneficial to me?
Next Test: Shutdown RabbitMQ in the middle of processing.
Code:
<mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:amqp="http://www.mulesoft.org/schema/mule/amqp"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/amqp http://www.mulesoft.org/schema/mule/amqp/current/mule-amqp.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd"
xmlns:context="http://www.springframework.org/schema/context">
<amqp:connector name="amqpAutoAckLocalhostConnector"
host="${config.status_reporting.host}"
port="${config.status_reporting.port}"
virtualHost="${config.status_reporting.virtual_host}"
username="${config.status_reporting.username}"
password="${config.status_reporting.password}"
requestedHeartbeat="${config.status_reporting.requestedHeartbeat}"
doc:name="AMQP Connector for Status Messages"/>
<flow name="send_status" doc:name="send_status">
<vm:inbound-endpoint path="send_status" exchange-pattern="one-way" responseTimeout="10000" doc:name="VM" />
<logger message="starting send status" level="DEBUG" doc:name="Logger"/>
<!-- some code here has been removed for stackoverflow question -->
<flow-ref name="cwm_send" doc:name="flow ref"/>
</flow>
<flow name="cwm_send" doc:name="cwm_send">
<amqp:outbound-endpoint exchangeName="${config.status_reporting.exchange_name}"
exchangeType="topic"
exchangeDurable="${config.status_reporting.exchange_is_durable}"
routingKey="${config.status_reporting.routing_key}"
connector-ref="amqpAutoAckLocalhostConnector" doc:name="AMQP Out" queueDurable="true" responseTimeout="10000"/>
</flow>
<flow name="send_ingest_status" doc:name="send_ingest_status">
<vm:inbound-endpoint exchange-pattern="request-response" responseTimeout="10000" doc:name="VM" path="send_ingest_status"/>
<vm:outbound-endpoint path="send_status" exchange-pattern="one-way" doc:name="Send Status">
<set-payload value="#[[
'status_code': 'foo',
'status_descr': 'test description.',
'status_final': '0',
'version': '1.0']]"/>
</vm:outbound-endpoint>
</flow>
</mule>
Thank you.
This problem also seems to occur when an exchange is declared only in an outbound endpoint. There is an open bug concerning this in the Mulesoft JIRA, and you can vote for it to help them prioritize it.
I took a look at the source code, and the problem seems to be that there is simply no code to declare exchanges when an outbound endpoint is started. In your case, you'd probably want the code to run at the time the message is sent, or maybe at the time the exchange is deleted. This timing wouldn't be covered by the aforementioned bug, but you might open a new issue describing the use case and the desired functionality. And a pull request would probably be even better! ;)

Is there a method in EWS Managed api similar to Get-CalendarProcessing method in PowerShell?

Using PowerShell I can easily get know "BookInPolicy" state in the room by executing command Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List
But question is perfoming something like that by using EWS manage api.
I spent a lot of time exploring this issue in the internet and unfortunately i found nothing. Is it realy posible to do? I hope you gave me some useful advices or solution.
By using the GetUserConfiguration EWS request you can obtain some of the BookInPolicy information.
E.g. by sending the following request for a meeting room's calendar
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2"/>
</soap:Header>
<soap:Body>
<m:GetUserConfiguration>
<m:UserConfigurationName Name="Calendar">
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>room#company.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:UserConfigurationName>
<m:UserConfigurationProperties>All</m:UserConfigurationProperties>
</m:GetUserConfiguration>
</soap:Body>
</soap:Envelope>
you will obtain a dictionary of information containing (among others) the following two fields
<t:DictionaryEntry>
<t:DictionaryKey>
<t:Type>String</t:Type>
<t:Value>AllBookInPolicy</t:Value>
</t:DictionaryKey>
<t:DictionaryValue>
<t:Type>Boolean</t:Type>
<t:Value>false</t:Value>
</t:DictionaryValue>
</t:DictionaryEntry>
<t:DictionaryEntry>
<t:DictionaryKey>
<t:Type>String</t:Type>
<t:Value>BookInPolicy</t:Value>
</t:DictionaryKey>
<t:DictionaryValue>
<t:Type>StringArray</t:Type>
<t:Value>75480a35-de48-46ad-8378-7c66137de736</t:Value>
<t:Value>498e21e9-1d88-4254-bea0-8d976c3e451d</t:Value>
<t:Value>08ffb1dd-64b8-438f-a924-ac3782975abf</t:Value>
</t:DictionaryValue>
</t:DictionaryEntry>
The downside is that I don't know how to query the IDs received for BookInPolicy.
You can obtain some permission information by using a GetFolder request
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2"/>
</soap:Header>
<soap:Body>
<m:GetFolder>
<m:FolderShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:FolderShape>
<m:FolderIds>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>room#company.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:FolderIds>
</m:GetFolder>
</soap:Body>
</soap:Envelope>
and reviewing the returned permission set but I didn't find any way to connect the permission information to the BookInPolicy IDs. (sample permission below)
<t:CalendarPermission>
<t:UserId>
<t:SID>S-1-5-21-799214634-780288877-1039276024-11759</t:SID>
<t:PrimarySmtpAddress>group#company.com</t:PrimarySmtpAddress>
<t:DisplayName>group</t:DisplayName>
</t:UserId>
<t:CanCreateItems>false</t:CanCreateItems>
<t:CanCreateSubFolders>false</t:CanCreateSubFolders>
<t:IsFolderOwner>false</t:IsFolderOwner>
<t:IsFolderVisible>true</t:IsFolderVisible>
<t:IsFolderContact>false</t:IsFolderContact>
<t:EditItems>None</t:EditItems>
<t:DeleteItems>None</t:DeleteItems>
<t:ReadItems>FullDetails</t:ReadItems>
<t:CalendarPermissionLevel>Reviewer</t:CalendarPermissionLevel>
</t:CalendarPermission>

BancBox SOAP API getClient - call fails using WCF client infrastructure

I apologize in advance if this post feels too long. But 1) this is my first post ever and 2) I have really been over the river and through the woods trying to figure this out.
The Add Service Reference feature in Visual Studio 2012 produces a proxy that (apparently) generates invalid SOAP messages. I suspect it has to do with serialization or how the proxy types are decorated but I cannot seem to figure it out. Help is much appreciated.
Detail 1. My environment is Visual Studio 2012 and I have created a .NET 4.5 class library with a service reference to https://sandbox-api.bancbox.com/v1/BBXPort?wsdl. I'm attempting to call the getClient() function; which is defined here. (http://www.bancbox.com/api/view/45)
The code looks like this:
public void GetClient()
{
// create an instance of the service reference proxy class
var bbx=newBBXClient();
bbx.ChannelFactory.Endpoint.Behaviors.Remove<System.ServiceModel.Description.ClientCredentials>();
bbx.ChannelFactory.Endpoint.Behaviors.Add(new CustomCredentials());
bbx.ClientCredentials.UserName.UserName="MY_USERNAME";
bbx.ClientCredentials.UserName.Password="MY_PASSWORD";
var customerId=newid {
subscriberReferenceId="44XX33YY"
};
var request=newgetClientRequest {
subscriberId=MY_SUBSCRIBER_ID,
clientId=customerId
};
var response=bbx.getClient(request);
}
Detail 2. I have made many successful calls into the web service via SoapUI. The successful SoapUI-produced SOAP messages look like this
<soapenv:Envelope xmlns:sch="schema.bancbox.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-11">
<wsse:Username>MY_USERNAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MY_PASSWORD</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">tRLo6AlRKl+/rULiKq6A6g==</wsse:Nonce>
<wsu:Created>2013-02-22T18:32:02.204Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:getClient>
<getClientRequest>
<subscriberId>MY_SUBSCRIBER_ID</subscriberId>
<clientId>
<!--Optional:-->
<subscriberReferenceId>44XX33YY</subscriberReferenceId>
</clientId>
</getClientRequest>
</sch:getClient>
</soapenv:Body>
</soapenv:Envelope>
Detail 3. Per Fiddler, my failed SOAP messages look like this
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPozcAgEH0QhJHloqMBWUf3mAAAAAA5wy3enJkDUGU8IaMUCFyEjzfL+1Uez1HhAvEeFpJ+30ACQAA</VsDebuggerCausalityData>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken u:Id="uuid-6e1c9f81-0651-41f7-b659-26b191bf7e13-1" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<o:Username>MY_USERNAME</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MY_PASSWORD</o:Password>
<o:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">hGggJkxurSkHQ3MKoeBK6AmEHNs=</o:Nonce>
<u:Created>2013-02-23T11:24:47.663Z</u:Created>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<getClient xmlns="schema.bancbox.com">
<getClientRequest xmlns="">
<subscriberId>MY_SUBSCRIBER_ID</subscriberId>
<clientId>
<subscriberReferenceId>XX55YY22</subscriberReferenceId>
</clientId>
</getClientRequest>
</getClient>
</s:Body>
</s:Envelope>
The SOAP message above is produced when running the GetClient() method. GetClient throws the following Exception.
System.ServiceModel.FaultException
Unmarshalling Error: cvc-elt.4.2: Cannot resolve 'getClientRequest' to a type definition for element 'getClientRequest'.
When I replay the same failing message using SoapUI, I get the following response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unmarshalling Error: cvc-elt.4.2: Cannot resolve 'getClientRequest' to a type definition for element 'getClientRequest'. </faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Detail 4. Based on my research, this indicates that the server on the other end is Apache CXS. It's choking on my SOAP request. So I started playing around with my SOAP message and submitting it via SoapUI.
The first glaring distance in the successful message and my fail message are these lines
SUCCESS
<sch:getClient>
<getClientRequest>
FAIL
<getClient xmlns="schema.bancbox.com">
<getClientRequest xmlns="">
So the first thing that I did was make my getClientRequest tag identical to the successful one.
<getClient xmlns="schema.bancbox.com">
<getClientRequest>
This produced the following response.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Found element {schema.bancbox.com}getClientRequest but could not find matching RPC/Literal part</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The next thing that I did is change the way the getClient tag is assigned a schema.
BEFORE
<getClient xmlns="schema.bancbox.com">
AFTER
<s:Envelope xmlns:bb="schema.bancbox.com" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
. . .
<bb:getClient>
<getClientRequest>
. . .
</bb:getClient>
The resultant SOAP message looks like this and it is successful.
<s:Envelope xmlns:bb="schema.bancbox.com" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPozcAgEH0QhJHloqMBWUf3mAAAAAA5wy3enJkDUGU8IaMUCFyEjzfL+1Uez1HhAvEeFpJ+30ACQAA</VsDebuggerCausalityData>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken u:Id="uuid-6e1c9f81-0651-41f7-b659-26b191bf7e13-1" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<o:Username>MY_USERNAME</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MY_PASSWORD</o:Password>
<o:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">hGggJkxurSkHQ3MKoeBK6AmEHNs=</o:Nonce>
<u:Created>2013-02-23T11:24:47.663Z</u:Created>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<bb:getClient>
<getClientRequest>
<subscriberId>MY_SUBSCRIBER_ID</subscriberId>
<clientId>
<subscriberReferenceId>XX55YY22</subscriberReferenceId>
</clientId>
</getClientRequest>
</bb:getClient>
</s:Body>
</s:Envelope>
So the million dollar questions are WHY and HOW.
*WHY does the .NET proxy class serialize the SOAP message the way it does?
*HOW do I fix it? How can I may my proxy serialize into the SOAP message above? How can I force the serializer to define shorthand for the message namespace in the Envelop and then use the shorthand in the message tag?
FYI, to even get to this point I had to get past a number of WCF WSE issues and ended up implementing the solution so generously provided on Rich Stahls blog. I would post the link but apparently I don't have enough rep.
From I understand, the SOAP message that WCF produces is syntactically correct. However, Java CXF web services are very rigid with regards to the SOAP messages that they will accept.
The solution to specific problem setting aliases for xml namespace definitions in the Operation node of the SOAP messages produced by WCF proxies involves implementing a Custom Message Inspector is detailed here: Force WCF to create an xml namespace alias in client proxy.
This has completely resolved my issue.

SOAP Service: Missing WS-Addressing header

I have a Netbeans SOAP service I can deploy with no issues and a Silverlight client.
When I call the service from Silverlight, I get (in silverlight):
new DiscourseParserWSClient created;
event handler added;
service called; Service State is: Open
http://localhost:8080/DiscourseParserWS/DiscourseParserWSService
An exception occurred during the operation, making the result invalid.
The remote server returned an error: NotFound.
After the client calls the service, GlassFish v3 Domain responds with the following problem I fail to decipher:
WARNING: A required header representing a Message Addressing Property is not present, Problem header:{http://www.w3.org/2005/08/addressing}Action
com.sun.xml.ws.addressing.model.MissingAddressingHeaderException: Missing WS-Addressing header: "{http://www.w3.org/2005/08/addressing}Action"
at com.sun.xml.ws.addressing.WsaTube.checkCardinality(WsaTube.java:235)
at com.sun.xml.ws.addressing.WsaTube.checkMessageAddressingProperties(WsaTube.java:183)
at com.sun.xml.ws.addressing.WsaServerTube.checkMessageAddressingProperties(WsaServerTube.java:281)
at com.sun.xml.ws.addressing.WsaTube.validateInboundHeaders(WsaTube.java:140)
at com.sun.xml.ws.addressing.WsaServerTube.processRequest(WsaServerTube.java:147)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:195)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:127)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:295)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:515)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143)
at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:147)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
I'm using Metro 2.1 and after quite some googling I suspect the problem might have something to do with it...
I can see the service's wsdl so I believe it can't be an implementation problem. But that warning's stack goes down to the Thread class o.O?
public void run() {
if (target != null) {
target.run(); // <-- to this line to be exact
}
}
Please help shed some light; I already have a couple of eclipse soap services working with this client, but I don't have experience with Netbeans, GlassFish and Metro and can't figure out what's causing this...
Don't know whether or not it is too late, but it helped me sometimes to add the
#Addressing(enabled=true,
required=false)
to the WebService (class annotation). Then the exception usually disappears.
For some more information about the addressing stuff you can refer to 1.
I was receiving the same WARNING and thought this might help someone else.
If you're using the "Reliable Message Delivery" option in Netbeans visual web service designer then you may get this warning.
If you don't require the "Reliable Message Delivery" you can simply turn it off.
I was facing this issue today and the problem was resolved by using the Action attribute on the soap header. I have confirmed this using SoapUI.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mal="http://example.com">
<soapenv:Header>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:2c7ea154-668e-4c8b-abaa-8b119f91b8dd</MessageID>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://example.com/input</Action>
</soapenv:Header>
<soapenv:Body>
......
</soapenv:Body>
</soapenv:Envelope>
If we arent passing the Action attribute than we get error message:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<FaultDetail xmlns="http://www.w3.org/2005/08/addressing">
<ProblemHeaderQName>{http://www.w3.org/2005/08/addressing}Action</ProblemHeaderQName>
</FaultDetail>
</S:Header>
<S:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageAddressingHeaderRequired</faultcode>
<faultstring>A required header representing a Message Addressing Property is not present</faultstring>
</SOAP-ENV:Fault>
</S:Body>
</S:Envelope>
The value of Action header is determined from #Action on the webmethod.
#Action(input = "http://example.com/input", output = "http://example.com/output")