HTTP request gives 302 - ruby

I have setup xml file, I think there ssl certificate issue while I am hitting http request in tsung.
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" dumptraffic="true" version="1.0">
<clients>
<client host="localhost" maxusers="1" use_controller_vm="true"/>
</clients>
<servers>
<server host="hostname.com" port="443" type="ssl"></server>
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="minute">
<users arrivalrate="1" unit="second"/>
</arrivalphase>
</load>
<sessions>
<session name="http_test_1" probability="100" type="ts_http">
<request subst="true">
<dyn_variable name="redirect" re="Location: (http://.*)\r"/>
<http url="/users/sign_in" contents='{"user": {"email": "vishal.jagtap+51#zibtek.com","password": "tudip123"}}' content_type='application/json' method="POST" version="1.1">
</http>
</request>
<thinktime random='true' value='27'/>
<repeat name="redirect_loop" max_repeat="5">
<request subst="true">
<dyn_variable name="redirect" re="Location: (http://.*)\r"/>
<http url="%%_redirect%%" method="GET"></http>
</request>
<until var="redirect" eq=""/>
</repeat>
<request>
<http url="/users/edit" method="GET" version="1.1">
</http>
</request>
</session>
</sessions>
</tsung>
in tsung.dump I get 302, how can I hit https request is there any way or any configuration in xml?
please please please help me here! I am stuck from 3 days :(

Try with the ip or just the hostname here not .com.
<servers>
<server host="HOSTNAME_HERE" port="443" type="ssl"></server>
</servers>
Refer the this

Related

Passing a bearer token in a 'Web Test' without Visual Studio?

I want to import a ".webtest" in Azure's Application Insights availability feature. I dont have a test edition of Visual Studio, but this MSDN article suggests using Fiddler as another option to creating web tests.
I need to perform 2 requests on a REST API:
Request a bearer token from the connect/token endpoint.
Perform a GET at api/resources with the bearer token (retrieved from the above request) in the header.
It's a typical client credentials OAuth 2 flow.
I cannot seem to figure out how to do this with Fiddler. Basically I need to extract a value from the response body of request 1 and use it as the header value in request 2.
This is what the web test looks like without passing the token:
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
Assuming this comes back as the following example you can use a regex extraction to get it.
{"token_type":"Bearer","scope":"user_impersonation","expires_in":"3600 ... "access_token":"{{TOKEN}}", ...}
<?xml version="1.0" encoding="utf-8"?>
<TestCase Name="FiddlerGeneratedWebTest" Id="" Owner="" Description="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="" TestCaseCallbackClass="">
<Items>
<Request Method="POST" Version="1.1" Url="https://example.com/connect/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<FormPostHttpBody ContentType="application/x-www-form-urlencoded">
<FormPostParameter Name="client_id" Value="myclientid" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="password123" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" UrlEncode="True" />
<FormPostParameter Name="scope" Value="myscopes" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Version="1.1" Url="https://example.com/api/resources" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</TestCase>
To compliment James Davis's answer, if you need to login to https://yourapp.com/auth/login by posting the JSON:
{
user: 'youruser',
password: 'yourpassword'
}
first base64 encode the json:
> echo "{user: 'youruser', password: 'yourpassword'}" | base64
e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K
Then pass this base64 value in a StringHttpBody tag
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="login-healthcheck" Id="e91b6e1d-3fa0-475f-a18b-b694b463589c" Owner="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
<Items>
<Request Method="POST" Guid="ef9d1d00-5663-476a-a3cb-ccf49c4d2229" Version="1.1" Url="https://yourapp.com/auth/login" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Content-Type" Value="application/json" />
</Headers>
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<StringHttpBody ContentType="application/json" InsertByteOrderMark="False">e3VzZXI6ICd5b3VydXNlcicsIHBhc3N3b3JkOiAneW91cnBhc3N3b3JkJ30K</StringHttpBody>
</Request>
<Request Method="GET" Guid="d566422f-af74-47bf-90aa-0c66db6ef567" Version="1.1" Url="https://yourapp.com/api/v1/healthcheck" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Authorization" Value="Bearer {{token}}" />
</Headers>
</Request>
</Items>
</WebTest>
Worked for me on Azure Application Insights Availability checking

Tsung Load test - Websocket + XMPP + SSL

Recently we have started investigating possibilities of creating load test script using Tsung tool to run against our XMPP server(Openfire).
I am using load balancer address as server server configuration, which distributes the load between Openfire cluster nodes and websocket port number is 7443.ATM my goal is to log into server using credentials and get the room count from server in particular venture.
Some how my script is unable to make requests to load balancer, I have verified in XMPP server logs just to make sure. I am not sure what I am missing in the configuration to make a successful authentication request, can some one help me to fix this please.
Protocol: Websocket
Port: 7743 (SSL)
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM '/home/prasad/Documents/tsung-1.6.0/tsung-1.0.dtd'>
<tsung loglevel='info' dumptraffic='false' version='1.0'>
<clients>
<client host='localhost' use_controller_vm='false'/>
</clients>
<servers>
<server host='chat.ppc1.pgt01.gamesysgames.com' port='7443' type='websocket'/>
</servers>
<load>
<arrivalphase phase="1" duration="2" unit="minute">
<users interarrival="2" unit="second"></users>
</arrivalphase>
</load>
<options>
<option type='ts_jabber' name='global_number' value='100000' />
<option type='ts_jabber' name='userid_max' value='100000' />
<option type='ts_jabber' name='domain' value='chat' />
<option type='ts_jabber' name='muc_service' value='jackpotjoy.chat' />
<option name="websocket_path" value='/ws' />
</options>
<sessions>
<session probability="100" name="websocket-example" type="ts_jabber">
<request>
<jabber type="connect" ack='local'>
<xmpp_authenticate username='' passwd='<VENTURE>jackpotjoy</VENTURE><TOKEN TYPE="1"><PUBLIC><MEMBER-ID>18118300</MEMBER-ID><NAME>media1</NAME><EXPIRY-DATE>1467207433297</EXPIRY-DATE></PUBLIC><CIPHER-TEXT><![CDATA[O9jTn2YZzMFwcLPdLbwiQ/PlKG5X47w6JYlfWJ6Yh+50XMcpWEHuGs0Q1qI9IjjpU1/n7cUsEc0MPsxyUkXexgMdMZqdhMG5+Kczf2T8Ma2JvzCYMIjnkuuqwUMhigVF28nhrfFLSeSVbv2PhWJ7XUedarkkVibKrVnQkkvCqkGB5oXZixu/TTJzpqb/wjuTOqRa+vmwz8l2Ljp/0hb/e3MHyLNcd21S]]></CIPHER-TEXT></TOKEN>'/>
</jabber>
</request>
<transaction name='authenticate'>
<request>
<jabber type='auth_sasl' ack='local' />
</request>
<request>
<jabber type='connect' ack='local' />
</request>
<request>
<jabber type='auth_sasl_bind' ack='local' />
</request>
<request>
<jabber type='auth_sasl_session' ack='local'/>
</request>
</transaction>
<request>
<jabber type='presence:initial' ack='local' />
</request>
<transaction name='roster'>
<request>
<jabber type='iq:roster:get' ack='local'></jabber>
</request>
</transaction>
<transaction name='get_roomcount'>
<request>
<jabber type='raw' ack='local' data='<iq to="jackpotjoy#chat" type="get"><query
xmlns="http://jabber.org/protocol/disco#items" node="roomcount" /></iq>'/>
</request>
</transaction>
<transaction name='close'>
<request>
<jabber type="close" ack='local' />
</request>
</transaction>
</session>
</sessions>
</tsung>
I don't see any error messages in logs, can someone help me please.
Sorry,I can only speak a little English.
You can try to modify dumptraffic = 'true' and set loglevel attribute.
Please look the Tsung User's manual:
6.1. File structure
If you add the attribute dumptraffic=”true”, all the traffic will be logged to a file.

tsung websocket testing garble message

I am trying to load test a websocket server. Server accepts and sends application/json and interactions seems to be rather fine.
Server accepts correctly messages sent from client (tsung). Unfortunately from the client perspective it can't read responses and I think might be related to the fact messages are garble at least looking at tsung.dump I see ASCII characters like NUL, SOH, SI, etc but I also see json responses from the server somehow ok.
This is my tsung.xml file snippet:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.5.0/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" dumptraffic="true">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="1000" />
</clients>
<servers>
<server host="127.0.0.1" port="8282" type="tcp" />
</servers>
<load>
<arrivalphase phase="1" duration="120" unit="second">
<users maxnumber="1" arrivalrate="1" unit="second" />
</arrivalphase>
</load>
<sessions>
<session name="websocket" probability="100" type="ts_websocket">
<request subst="true">
<websocket type="connect" path="/fancyurl?Content-Type=application/json"></websocket>
</request>
<transaction name="getsession">
<request subst="true">
<dyn_variable name="sessionid" jsonpath="session"/>
<websocket type="message">{"type": "EventMessageCmd", "user": "lnramirez", "eventCode" : "epfl"}
</websocket>
</request>
</transaction>
<thinktime value="10"/>
<request>
<dyn_variable name="boothAck" jsonpath="commandStatus" />
<websocket type="message">
{
"user": "lramirezmonterosa",
"eventCode": "epfl",
"type": "BoothMessageCmd",
"boothCode": "ic",
"commandStatus": "REQUESTED",
"boothRequest": "JOIN"
}
</websocket>
</request>
<request>
<websocket type="close"></websocket>
</request>
</session>
</sessions>
</tsung>
tsung.dump:
Send:1390970727.56257:<0.84.0>:‚ìÝju¦`U_ýJU_ýJU_ýJU_ÿ¸HO_ÿ/³8®¸)ÿFU]¨
ÿPU]±´°¸¼HY_ÿ³6¹W_çJW­]×JU_ýJU_ýJU_ýJU
Recv:1390970727.588689<0.84.0>:~{"type":"HeartBeatMessageCmd","timeCmdBroadcasted":1390970727588,"timeCmdGenerated":1390970727588,"commandStatus":"REQUESTED","user":"lramirezmonterosa","eventCode":"epfl","uuid":"a91e2c1b-859d-4299-99fd-e7ba63ba1f42","userSession":"25bb5627-4eb3-4a23-a1c9-edd5b8231808"}`

Tsung load testing for MongooseIM (websockets)

My question is about configuring my tsung.xml file to load-test chat application.
So, we have our MongooseIM server on the server side, jsjac.js library for our web-based client. We use xmpp and websockets to communicate.
httpbase for jsjac is looks like ws://hostname:5288/ws-xmpp/ and this part works fine for me. Tsung is supports websockets "from the box" and everybody says that the best way to test websockets - is to use tsung. But there is not so much information about how to do that.
Here is my tsung.xml:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="10" />
</clients>
<servers>
<server host="hostname" port="5288" type="tcp" />
</servers>
<load>
<arrivalphase phase="1" duration="10" unit="second">
<users maxnumber="1" arrivalrate="1" unit="second" />
</arrivalphase>
</load>
<sessions>
<session name="websocket" probability="100" type="ts_websocket">
<request subst="true">
<websocket type="connect" path="/ws-xmpp"></websocket>
</request>
<request>
<dyn_variable name="uid" jsonpath="uid"/>
<websocket type="message">{"user":"bob", "password":"bob"}</websocket>
</request>
<request subst="true">
<match do="log" when="nomatch">ok</match>
<websocket type="message">{"uid":"%%_uid%%", "data":"data"}</websocket>
</request>
<request>
<websocket type ="message">{"key":"value"}</websocket>
</request>
<request>
<websocket type="close"></websocket>
</request>
</session>
</sessions>
</tsung>
and after test passed the result is:
connected: 0
finish_users_count: 1
users: 1
users count: 1
websocket_succ: 1
user "bob" is really exist in server's db and works fine via client application.
Can anybody tell me what i'm doing wrong?
Or maybe someone could provide a link to some article or working xml file?
Thanks.
Best way to test XMPP over Websockets is to use standard Jabber scenario with specific server configuration:
<servers>
<server host="localhost" port="5288" type="websocket"></server>
</servers>
<options>
(...)
<option name="websocket_path" value="/ws-xmpp"/>
</options>
Sample Jabber scenario can be found e.g. in "examples" directory in Tsung repo. I think plaintext login is used there so if you'll still have problem connecting users, replace transaction "authenticate" with:
<transaction name="authenticate">
<request><jabber type="auth_sasl" ack="local" /></request>
<request><jabber type="connect" ack="local" /></request>
<request><jabber type="auth_sasl_bind" ack="local" /></request>
<request><jabber type="auth_sasl_session" ack="local" /></request>
</transaction>
There was a couple of things to do... so,first of all, BIG THANKS to Piotr!
his response (+ jabber scenario example) has helped to solve my problem
here is my working tsung.xml
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true"></client>
</clients>
<!-- Server side setup -->
<servers>
<server host="servernameOrIp" port="5288" type="websocket"></server>
</servers>
<load>
<arrivalphase phase="1" duration="20" unit="second">
<users interarrival="1" unit="second"></users>
</arrivalphase>
</load>
<!-- JABBER parameters -->
<options>
<option type="ts_jabber" name="global_number" value="20"></option>
<option type="ts_jabber" name="userid_max" value="20"></option>
<option type="ts_jabber" name="domain" value="servernameOrIp"></option>
<option type="ts_jabber" name="username" value="user00"></option>
<option type="ts_jabber" name="passwd" value="user00"></option>
<option name="websocket_path" value="/ws-xmpp"/>
</options>
<sessions>
<session probability="100" name="jabber-example" type="ts_jabber">
<request> <jabber type="connect" ack="no_ack"></jabber> </request>
<thinktime value="2"></thinktime>
<transaction name="authenticate">
<request><jabber type="auth_sasl" ack="local" /></request>
<request><jabber type="connect" ack="local" /></request>
<request><jabber type="auth_sasl_bind" ack="local" /></request>
<request><jabber type="auth_sasl_session" ack="local" /></request>
</transaction>
<request> <jabber type="presence:initial" ack="no_ack"/> </request>
<thinktime value="10"></thinktime>
<transaction name="roster">
<request> <jabber type="iq:roster:get" ack="local"></jabber></request>
</transaction>
<thinktime value="10"></thinktime>
<transaction name="online">
<request> <jabber type="chat" ack="no_ack" size="16" destination="online"></jabber> </request>
</transaction>
<thinktime value="10"></thinktime>
<transaction name="offline">
<request> <jabber type="chat" ack="no_ack" size="56" destination="offline"></jabber> </request>
</transaction>
<thinktime value="2"></thinktime>
<transaction name="close">
<request> <jabber type="close" ack="no_ack"></jabber> </request>
</transaction>
</session>
</sessions>
</tsung>
with this tsung is generates 20 users (user001 - user0020) and i can see them all in my "bob's" roster. I use a Spark IM client to monitor this.

How to customize the schema inlined inside an imported WSDL

I have a.wsdl & b.wsdl where a.wsdl imports b.wsdl.
Now I have to customize the schema inside b.wsdl using wsimport and JAXB. but using below customization is giving error that "XPath evaluation of "wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']" results in an empty target node
I am not able to find a way to customize the inlined schema in imported b.wsdl when generating the client code using wsimport.
<jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jaxb:globalBindings>
<jaxb:javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
</jaxb:globalBindings>
</jaxws:bindings>
A.wsdl
<definitions targetNamespace="a"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:interface="b">
<import location="b.wsdl" namespace="b"/>
<service name="Service">
<port binding="interface:Binding" name="Port">
<soap:address location="https://localhost/sdk/vpxdService" />
</port>
</service>
</definitions>
B.wsdl
<definitions targetNamespace="b"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:b="b"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<schema
targetNamespace="b"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:b="b"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<complexType name="XYZ">
<sequence>
<element name="dynamicType" type="xsd:string" minOccurs="0" />
<element name="val" type="xsd:anyType" maxOccurs="unbounded" />
</sequence>
</complexType>
</types>
</schema>
</definitions>
After going through given website I modified the external binding file to use wsdlLocation="b.wsdl" instead of node="wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']" which did the magic.
This will make sure that the inline schema defined in WSDL will customized as required.
<bindings
xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
version="2.0">
<bindings wsdlLocation="b.wsdl">
<globalBindings>
<javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
printMethod="javax.xml.bind.DatatypeConverter.printDate"
/>
</globalBindings>
</bindings>
</bindings>
http://fusesource.com/docs/framework/2.1/jaxws/JAXWSCustomTypeMappingOverview.html
Have you tried adding the following attributes to the <jaxws:bindings> element?
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
and
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
You're referencing the xsd and wsdl namespaces in your xpath expression, but until you define the URI's for them, they won't match up with the URI's in the target documents.

Resources