I am getting number format exception while trying to get the issue details by using id.
RemoteIssue ri = jira.getIssueById(JIRAtoken, string.Format(IssueKey));
here jiratoken is string. But giving exception. Any one have any idea?
I had the same problem, using the SOAP Web Service API of JIRA (4).
I solved it by using getIssue instead of getIssueById. With getIssue, JIRA expects the key like MYPROJECT-3.
Now I send a request like this, and it works :
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap.rpc.jira.atlassian.com">
<soapenv:Header/>
<soapenv:Body>
<soap:getIssue soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="xsd:string">MyAuthToken</in0>
<in1 xsi:type="xsd:string">MYPROJECT-1</in1>
</soap:getIssue>
</soapenv:Body>
</soapenv:Envelope>
Related
I have been stuck iwht the authorization process wiht Travelport uAPI.
So far, we have been able to successesfully create a terminal session and returns a host token.
Following this, i need to Include the host token in order to the create a terminal session response.
I hit a post request to the API - (https://americas.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/TerminalService) with my generated token
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ter:TerminalReq AuthorizedBy="PRODSMOKETEST" TargetBranch="P1064XX" xmlns:ter="http://www.travelport.com/schema/terminal_v33_0" xmlns:com="http://www.travelport.com/schema/common_v33_0">
<com:BillingPointOfSaleInfo OriginApplication="UAPI"/>
<com:HostToken Host="1V" Key="1T">7BC47E76-49E8-436D-5061-XXXXXXXXXXXX</com:HostToken>
<ter:TerminalCommand>ADENATL</ter:TerminalCommand>
</ter:TerminalReq>
</soapenv:Body>
</soapenv:Envelope>
The respoonse is shared below:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<terminal:TerminalRsp TransactionId="A9D4AF0F0A0D6A81BE7458993D2C259F" ResponseTime="15" xmlns:terminal="http://www.travelport.com/schema/terminal_v33_0">
<terminal:TerminalCommandResponse>
<terminal:Text>SIGN IN </terminal:Text>
<terminal:Text>><</terminal:Text>
</terminal:TerminalCommandResponse>
</terminal:TerminalRsp>
</SOAP:Body>
</SOAP:Envelope>
The issue seems to be around the Terminal command log in wiht ADENATL .
I am not able to figure out if this is an issue with the log "ADENATL" or if I am missing out on any step?
Any help would be appreciated
I have tried the loggoin in with the terminal commands SON/ZHA, which gives me an eorror with Agent ID.
i am using third party Exigo Api request for my app. the service says to send 2 more requests array in the body of main Soap service. Though i tried sending the 2 request in string form in the Body of the main request but i received Empty String . Help me out how should i do this . i got no solution in the manual or on any other site after googling this issue for a week i am posting this question
Exigo Api (Process Transaction Service)
POST /3.0/ExigoApi.asmx HTTP/1.1
Host: api.exigo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.exigo.com/ProcessTransaction"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ApiAuthentication xmlns="http://api.exigo.com/">
<LoginName>string</LoginName>
<Password>string</Password>
<Company>string</Company>
</ApiAuthentication>
</soap:Header>
<soap:Body>
<TransactionalRequest xmlns="http://api.exigo.com/">
<TransactionRequests>
<ApiRequest />
</TransactionRequests>
</TransactionalRequest>
</soap:Body>
</soap:Envelope>
This is the Soap request i have to process and Send Api Request Array in the body of the main request using iOS.
Thanks in Advance
Please check below link, like
let body = envelope.addChild(name: "soap:Body")
let header = body.addChild(name: "soap:Header" , attributes: ["xmlns:m" : "http://www.w3schools.com/transaction/"])
https://github.com/tadija/AEXML
We have tackle same type of issue for our mobile app. We have have implemented adapter that accepts JSON request from Mobile and then translate that into API request which is inculded in MVC Application as wsdl. Can't find any other way to do that.
Objective
Build Soap call via savon v2
What I tried :
my soap call RQ , this is what given in the documentation
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.opentravel.org/OTA/2003/05">
<soapenv:Header/>
<soapenv:Body>
<OTA_AirLowFareSearchRQ TimeStamp="2012-04-18T07:30:42.663Z" Target="Production" Version="1.0" PrimaryLangID="en" AltLangID="en" RetransmissionIndicator="false" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source ISOCountry="ZA" ISOCurrency="ZAR" DisplayCurrency="ZAR" DisplayRate="1.0" FirstDepartPoint="CPT" FinalDestinationPoint="JNB">
<RequestorID Type="Company" ID="website" ID_Context="ts" TSAffiliateID="<AFFILIATE_ID>" MessagePassword="<AFFILIATE_PASSWORD>">
<CompanyName><AFFILIATE_ID></CompanyName>
</RequestorID>
</Source>
</POS>
<OriginDestinationInformation RefNumber="0">
<DepartureDateTime>2012-07-26T00:00:00CAT</DepartureDateTime>
<OriginLocation LocationCode="CPT" CodeContext="iata"/>
<DestinationLocation LocationCode="JNB" CodeContext="iata"/>
</OriginDestinationInformation>
<OriginDestinationInformation RefNumber="1">
<DepartureDateTime>2012-07-29T00:00:00CAT</DepartureDateTime>
<OriginLocation LocationCode="JNB" CodeContext="iata"/>
<DestinationLocation LocationCode="CPT" CodeContext="iata"/>
</OriginDestinationInformation>
<TravelPreferences>
<FlightTypePref FlightType="Nonstop" DirectAndNonStopOnlyInd="true"/> <!-- This line is optional – include to filter direct flights only -->
<CabinPref Cabin="Economy"/>
</TravelPreferences>
<TravelerInfoSummary>
<AirTravelerAvail>
<PassengerTypeQuantity Code="7" Quantity="0"/>
<PassengerTypeQuantity Code="8" Quantity="0"/>
<PassengerTypeQuantity Code="9" Quantity="0"/>
<PassengerTypeQuantity Code="10" Quantity="1"/>
</AirTravelerAvail>
</TravelerInfoSummary>
</OTA_AirLowFareSearchRQ>
</soapenv:Body>
</soapenv:Envelope>
my Target Url : eg: http://www.example.com?wsdl
operation name : search
#client = Savon.client(wsdl: ' http://www.example.com?wsdl')
#client.call(:search, message: { 'RefNumber' => '1','DepartureDateTime'=>'2014-09-26T00:00:00CAT','ArrivalDateTime'=>'2012-10-26T00:00:00CAT','OriginLocation'=>'CPT','DestinationLocation'=>'JNB' })
what i am getting :
(SOAP:Server) No handlers could be found for unmarshalling the SOAP body payload
The Soap call i built is correct or i have to build the entire xml of Soap body ?
Any help is appreciated !!
My standard answer:
download SoapUI
build a valid SOAP request.
make sure it works
then replicate the request with Ruby/Savon
if it still doesn't work, ask again
I am trying to hit a SOAP Service from Ruby on Rails - from SOAP UI I can hit it fine and the request XML is as below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:mun="http://schemas.datacontract.org/2004/07/MyExternalService.Map" xmlns:mun1="http://schemas.datacontract.org/2004/07/MyExternalService.Common.Map">
<soapenv:Header/>
<soapenv:Body>
<tem:GetInformationsForCoordinates>
<!--Optional:-->
<tem:coordReq>
<!--Optional:-->
<mun:Coordinates>
<!--Zero or more repetitions:-->
<mun:Coordinate>
<!--Optional:-->
<mun:Id>1</mun:Id>
<!--Optional:-->
<mun:QualityIndex>90</mun:QualityIndex>
<!--Optional:-->
<mun:X>-110.5322</mun:X>
<!--Optional:-->
<mun:Y>35.2108</mun:Y>
</mun:Coordinate>
</mun:Coordinates>
</tem:coordReq>
<!--Optional:-->
<tem:analysisTypes>
<!--Zero or more repetitions:-->
<mun:AnalysisType>Additional</mun:AnalysisType>
</tem:analysisTypes>
</tem:GetInformationsForCoordinates>
</soapenv:Body>
</soapenv:Envelope>
If I copy that exact XML into a Ruby string with request = %q(XML STRING) into savon and use the method and then in Savon call the following:
response = client.call(:get_info, xml: request)
It works as expected and I get my response - however in reality I want to be just passing the parameters to Savon. So far I have tried the following:
coordinate = { Id: '1', X: -110.5322, Y: 35.2108, QualityIndex: 90 }
coordinates = {Coordinates: [coordinate] }
coordinateReq = {coordReq: {coordinates: coordinates} }
response = client.call(:get_informations_for_coordinates, message: coordinateReq)
This fails and if I look at the XML I am sending it is below:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<tns:GetInformationsForCoordinates>
<coordReq>
<coordinates>
<coordinates>
<Id>1</Id>
<X>-110.5322</X>
<Y>35.2108</Y>
<QualityIndex>90</QualityIndex>
</coordinates>
</coordinates>
</coordReq>
</tns:GetInformationsForCoordinates>
</env:Body>
</env:Envelope>
In comparison to what is sent from SOAP UI I am missing the xmlns:mum namespace - is there anyway I can add it my request so that it is added to each parameter i.e. X, Y QualityIndex - also the tem which is similar to tns in my Savon call is added to the coordReq in SOAPUI but not in my Savon call - is there anyway I can add it?
Also I am having some difficulty in working out how to Build the analysisTypes and AnalysisType part of my request?
From the documentation:
Namespaces
If you don’t pass a namespace to Savon::Client#request, Savon will
register the target namespace (“xmlns:wsdl”) for you. If you did
pass a namespace, Savon will use it instead of the default one. For
example:
client.request :v1, :get_user
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:v1="http://v1.example.com">
<env:Body>
<v1:GetUser>
</env:Body>
</env:Envelope>
You can always set namespaces or overwrite namespaces set by Savon.
Namespaces are stored as a simple Hash.
# setting a new namespace
soap.namespaces["xmlns:g2"] = "http://g2.example.com"
# overwriting the "xmlns:wsdl" namespace
soap.namespaces["xmlns:wsdl"] = "http://ns.example.com"
Apparently, for Savon 2, setting multiple namespaces is impossible:
I found that is not possible (for now) to set multiple namespaces on
version 2 of Savon.
For now i migrate my application on Savon version 1 and it worked =)
To use multiple namespaces you put the following type of code in your client definition
...
:namespaces => {
"xmlns:v2" => "http://v2.example.com",
"xmlns:v1" => "http://v1.example.com" },
...
I developed one service using websphere application server and Rational application developer(RAD) . I am using SOAP UI to unit test my service. The service is well deployed and getting the accurate results but the problem is in the namespace prefixes.prefixes of response i am getting is different from the prefixes of request namespaces. i.e. if request having namespaces defined as common, domain etc..i am getting response having namespaces as a,b,c ..
the request is as goes here...
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tic="http://www.trrt.com/pos/TicketRemark_v1" xmlns:dom="http://www.tport.com/pos//Domain" xmlns:com="http://www.tralport.com/pos//Common">
<soapenv:Header/>
<soapenv:Body>
<tic:RetrrksRequest Version="1" >
<dom:TicketDocument TicketNbr="6000001"/>
</tic:RetrrksRequest>
</soapenv:Body>
</soapenv:Envelope>
the response is...
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<c:RetrrksResponse Version="1" TimeStamp="2012-08-23T14:15:59.000" xmlns:a="http://www.trrt.com/pos/viewtrip/schema/CommonTypes_v1" xmlns:b="http://www.trport.com/pos/viewtrip/schema/DomainTypes_v1" xmlns:c="http://www.travt.com/pos/viewtrip/schema/TicketRemarksServices_v1">
<a:Success/>
<b:TicketDocument TicketDocumentNbr="6000000000001" TotalDocQuantity="7"/>
<b:BookiID CreateDateTime="2012-08-12T12:40:00.000" PurgeDate="2013-06-20" ID="ABCDEF">
</b:BookiID>
<b:FeeRemarks>
<b:Remark Type="3000">remark text</b:Remark>
</b:FeeRemarks>
</c:RetrirksResponse>
</soapenv:Body>
</soapenv:Envelope>
This is not a problem. The namespace prefix may be arbitrary, so long as it references the correct namespace. One should not depend on the particular choice of a namespace prefix. Any code that does rely on a choice of prefix will likely suffer interoperability problems.