SOAP UI error from setup groovy script
It is something wrong when I define the first string from the setNodeValue method. The XPath is not correct or I might be missing something.
Any ideas?
Error : org.apache.xmlbeans.XmlException:error:Unexpected element: CDATA
SOAP Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:log="Logisense_EngageIP">
<soapenv:Header>
<log:AuthHeader>
<!--Optional:-->
<log:Username>vv</log:Username>
<!--Optional:-->
<log:Password>vv</log:Password>
</log:AuthHeader>
</soapenv:Header>
<soapenv:Body>
<log:CreateUser>
<!--Optional: DYNAMIC VALUE -->
<log:username>${username}</log:username>
<!--Optional:-->
<log:password>test</log:password>
<!--Optional:-->
<log:alternativeUsername>de</log:alternativeUsername>
<!--Optional:-->
<log:roleName>admin</log:roleName>
<!--Optional:-->
<log:cultureName>English</log:cultureName>
<!--Optional:-->
<log:languageName>English</log:languageName>
<!--Optional: -->
<log:ownerUsername>admin</log:ownerUsername>
<!--Optional:-->
<log:parentUsername></log:parentUsername>
<!--Optional:-->
<log:userStatusTypeName>Enabled</log:userStatusTypeName>
<!--Optional:-->
<log:creditRatingName>Default</log:creditRatingName>
<!--Optional:-->
<log:billGroupName>Default</log:billGroupName>
<log:expireDate>2015-09-12</log:expireDate>
</log:CreateUser>
</soapenv:Body>
</soapenv:Envelope>
Groovy script setup :
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder("CreateUserRequest1#Request")
holder.setNodeValue("/soapenv:Envelope/soapenv:Body/log:CreateUser/log:username","Jose Amaral")
holder.updateProperty()
Related
I am trying to make a call to this SABRE API for testing. The problem is that it is giving me "Invalid Token" even if I get the token from their website. Looks like it is some kind of exception swallowing.
Can anybody help?
URL:"https://webservices.havail.sabre.com/websvc
Request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:From>
<eb:PartyId />
</eb:From>
<eb:To>
<eb:PartyId />
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>OTA_VehAvailRateLLSRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>mid:20001209-133003-2333#clientofsabre.com</eb:MessageId>
<eb:Timestamp>2001-02-15T11:15:12Z</eb:Timestamp>
<eb:TimeToLive>2001-02-15T11:15:12Z</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"><TOKEN></wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:Reference xlink:href="cid:rootelement" xlink:type="simple" />
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI"/>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI"/>
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1268526483006710967</eb:MessageId>
<eb:Timestamp>2020-04-20T13:25:00</eb:Timestamp>
<eb:RefToMessageId>mid:20001209-133003-2333#clientofsabre.com</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode>
<faultstring>Invalid or Expired binary security token: T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.session.SessionException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
I have the impression that I am doing something wrong, I really have no idea what is going on, I can't see much documentation about it.
Thanks.
First of all you should investigate "How to" guides from Sabre.
https://developer.sabre.com/guides/travel-agency/how-to/get-token.
A token is created after SessionCreate call.
So you can use BinarySecurityToken value under SessionCreate response.
https://developer.sabre.com/docs/soap_apis/session_management/create_session
I am getting this error and not receiving output. Can you please help me out?
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured </Error>
</Errors>
<Warnings/>
</Messages>
Here is the complete code:
Sent
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.echo.com/">
<soapenv:Header/>
<soapenv:Body>
<echo:GetQuote>
<!--Optional:-->
<echo:echoRateRequest>
<!--Optional:-->
<echo:AuthInfo>
<!--Optional:-->
<echo:UserId></echo:UserId>
<!--Optional:-->
<echo:Password></echo:Password>
</echo:AuthInfo>
<!--Optional:-->
<echo:Requests>
<!--Zero or more repetitions:-->
<echo:Request>
<echo:TotalWeight>1000</echo:TotalWeight>
<!--Optional:-->
<echo:Items>
<!--Zero or more repetitions:-->
<echo:Item OriginId="1" DestinationId="1">
<echo:Class>70</echo:Class>
<echo:Weight>1000</echo:Weight>
</echo:Item>
</echo:Items>
<!--Optional:-->
<echo:Accessorials>
<!--Zero or more repetitions:-->
<echo:Accessorial>
<echo:AccessorialId>12</echo:AccessorialId>
<echo:Charge>0</echo:Charge>
<!--Optional:-->
<echo:PickDel></echo:PickDel>
<!--Optional:-->
<echo:RateType></echo:RateType>
<!--Optional:-->
<echo:Description>?</echo:Description>
</echo:Accessorial>
</echo:Accessorials>
<!--Optional:-->
<echo:Origin Id="">
<!--Optional:-->
<echo:Name></echo:Name>
<!--Optional:-->
<echo:Address1></echo:Address1>
<!--Optional:-->
<echo:Address2></echo:Address2>
<!--Optional:-->
<echo:City></echo:City>
<!--Optional:-->
<echo:State></echo:State>
<!--Optional:-->
<echo:Zip>91101</echo:Zip>
</echo:Origin>
<!--Optional:-->
<echo:Destination Id="?">
<!--Optional:-->
<echo:Name></echo:Name>
<!--Optional:-->
<echo:Address1></echo:Address1>
<!--Optional:-->
<echo:Address2></echo:Address2>
<!--Optional:-->
<echo:City></echo:City>
<!--Optional:-->
<echo:State></echo:State>
<!--Optional:-->
<echo:Zip>60425</echo:Zip>
</echo:Destination>
<echo:PickupDate>2015-10-03</echo:PickupDate>
<!--Optional:-->
<echo:ShipmentType></echo:ShipmentType>
<echo:PalletQty>0</echo:PalletQty>
<echo:ReturnMultipleCarriers>false</echo:ReturnMultipleCarriers>
<echo:SaveQuote>false</echo:SaveQuote>
</echo:Request>
</echo:Requests>
</echo:echoRateRequest>
</echo:GetQuote>
</soapenv:Body>
</soapenv:Envelope>
Received response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetQuoteResponse xmlns="http://www.echo.com/">
<GetQuoteResult>
<TotalRateQuotes>1</TotalRateQuotes>
<RateQuote>
<QuoteId>0</QuoteId>
<Request>
<TotalWeight>1000</TotalWeight>
<Items>
<Item OriginId="1" DestinationId="1">
<Class>70</Class>
<Weight>1000</Weight>
</Item>
</Items>
<Accessorials>
<Accessorial>
<AccessorialId>12</AccessorialId>
<Charge>0</Charge>
<PickDel/>
<RateType/>
<Description>?</Description>
</Accessorial>
</Accessorials>
<Origin Id="">
<Name/>
<Address1/>
<Address2/>
<City/>
<State/>
<Zip>91101</Zip>
</Origin>
<Destination Id="?">
<Name/>
<Address1/>
<Address2/>
<City/>
<State/>
<Zip>60425</Zip>
</Destination>
<PickupDate>2015-10-03T00:00:00</PickupDate>
<ShipmentType/>
<PalletQty>0</PalletQty>
<ReturnMultipleCarriers>false</ReturnMultipleCarriers>
<SaveQuote>false</SaveQuote>
</Request>
<RateDetails/>
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured.</Error>
</Errors>
<Warnings/>
</Messages>
</RateQuote>
</GetQuoteResult>
</GetQuoteResponse>
</soap:Body>
</soap:Envelope>
I was really working hard on it and was unable to find solution on this issue. If you want you can test using these links your self.
Standard (production):
http://services.echo.com/Quote.asmx
http://services.echo.com/Quote.asmx?wsdl
Tried from my end as well
Request:
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetQuote xmlns="http://www.echo.com/">
<echoRateRequest>
<AuthInfo>
<UserId>test-soap</UserId>
<Password>xxxx</Password>
</AuthInfo>
<Requests>
<Request>
<TotalWeight>3.12</TotalWeight>
<PickupDate>2002-09-24-06:00</PickupDate>
<PalletQty>12</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
<Request>
<TotalWeight>12.4</TotalWeight>
<PickupDate>2002-09-24-06:00</PickupDate>
<PalletQty>34</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
</Requests>
</echoRateRequest>
</GetQuote>
</soap12:Body>
</soap12:Envelope>
Response I got
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetQuoteResponse xmlns="http://www.echo.com/">
<GetQuoteResult>
<TotalRateQuotes>1</TotalRateQuotes>
<RateQuote>
<QuoteId>0</QuoteId>
<Request>
<TotalWeight>0</TotalWeight>
<Items/>
<Accessorials/>
<Origin/>
<Destination/>
<PickupDate>2002-09-24T01:00:00-05:00</PickupDate>
<PalletQty>12</PalletQty>
<ReturnMultipleCarriers>true</ReturnMultipleCarriers>
<SaveQuote>true</SaveQuote>
</Request>
<RateDetails/>
<Messages>
<Status>-999</Status>
<Errors>
<Error xsi:type="xsd:string">Unexpected Error has occured.</Error>
</Errors>
<Warnings/>
</Messages>
</RateQuote>
</GetQuoteResult>
</GetQuoteResponse>
</soap:Body>
</soap:Envelope>
It means there is a problem in the values we send , please check the logs in the servers what is causing this error .. 2nd look at the documentation what values each field must take . if we dont have proper input we always end with no happy response. the key here is to send proper values.
I am trying to use Sabre SOAP api for hotel reservation. But not able to get pass this VERIFY RATE LEVEL error. My request payload for hotel booking is given below:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand="0">
<eb:From>
<eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
</eb:To>
<eb:CPAId>H65H</eb:CPAId>
<eb:ConversationId>app_name</eb:ConversationId>
<eb:Service eb:type="sabreXML"></eb:Service>
<eb:Action>OTA_HotelResLLSRQ</eb:Action>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">
<!-- Use Security token from Authentication Request -->
<<-- sabre auth token -->>
</wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<OTA_HotelResRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.2.0">
<Hotel>
<BasicPropertyInfo ChainCode="HY" HotelCode="1"/>
<Guarantee Type="GDPST">
<CC_Info>
<PaymentCard Code="cc-cvc" ExpireDate="cc-date" Number="cc-number"/>
<PersonName>
<Surname>TEST</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<GuestCounts Count="2">
<ExtraGuest>1</ExtraGuest>
</GuestCounts>
<RoomType NumberOfUnits="1" RoomTypeCode="A2DRAC"/>
<TimeSpan End="12-24T13:00" Start="12-22T12:00"/>
</Hotel>
</OTA_HotelResRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But I got the response back with 1VERIFY RATE LEVEL error as shown below
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId>
</eb:To>
<eb:CPAId>H65H</eb:CPAId>
<eb:ConversationId>app_name</eb:ConversationId>
<eb:Service eb:type="sabreXML"/>
<eb:Action>OTA_HotelResLLSRS</eb:Action>
<eb:MessageData>
<eb:MessageId>8860ceca-d624-4fc6-b3a6-c1f7a7da5f43#61</eb:MessageId>
<eb:Timestamp>2015-12-09T06:26:01</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTC!ICESMSLB\/CRT.LB!-3460990906663307648!220138!0</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<OTA_HotelResRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.2.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2015-12-09T00:26:01-06:00">
<stl:SystemSpecificResults>
<stl:Message>1VERIFY RATE LEVEL </stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</OTA_HotelResRS>
</soap-env:Body>
</soap-env:Envelope>
I am unable to figure out what problem is, as I am unable to find anything related to 1VERIFY RATE LEVEL in Sabre documenatation.
What is the problem? Is my request payload invalid or some params are missing?
Thanks
I guess this is where you went wrong.
<eb:Action>OTA_HotelResLLSRQ</eb:Action>
the correct value is
<eb:Action>OTA_HotelAvailLLSRQ</eb:Action>
also pass value in the below tag.
<eb:Service eb:type="sabreXML">HotelAvailLLSRQ</eb:Service>
body request part
<ns:OTA_HotelAvailRQ Version="2.2.0">
<ns:AvailRequestSegment>
<ns:GuestCounts Count="2"/>
<ns:HotelSearchCriteria >
<ns:Criterion>
<ns:Address>
<ns:CityName></ns:CityName>
<ns:CountryCode>US</ns:CountryCode>
<ns:PostalCode></ns:PostalCode>
<ns:StreetNmbr></ns:StreetNmbr>
</ns:Address>
<ns:HotelRef HotelCityCode="DFW" />
</ns:Criterion>
</ns:HotelSearchCriteria>
<ns:TimeSpan End="02-12" Start="01-12"/>
</ns:AvailRequestSegment>
</ns:OTA_HotelAvailRQ>
I hope this solves your issue.
Thanks.
Using SOAP against CUCM's AXL web service, there are a number of query calls.
getLine
getDeviceProfile
getUser
and so on.
The WDSL shows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getDeviceProfile sequence="?">
<!--You have a CHOICE of the next 2 items at this level-->
<name>?</name>
<uuid>?</uuid>
<!--Optional:-->
<returnedTags ctiid="?" uuid="?">
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<description>?</description>
<!--Optional:-->
<product>?</product>
<!--Optional:-->
<model>?</model>
<!--Optional:-->
<class>?</class>
<!--Optional:-->
<protocol>?</protocol>
<!--Optional:-->
<protocolSide>?</protocolSide>
<!--Optional:-->
<userHoldMohAudioSourceId>?</userHoldMohAudioSourceId>
<!--Optional:-->
<vendorConfig>
<!--You may enter ANY elements at this point-->
</vendorConfig>
<!--Optional:-->
<versionStamp>?</versionStamp>
<!--Optional:-->
<traceFlag>?</traceFlag>
<!--Optional:-->
<mlppDomainId>?</mlppDomainId>
<!--Optional:-->
<mlppIndicationStatus>?</mlppIndicationStatus>
<!--Optional:-->
<preemption>?</preemption>
<!--Optional:-->
<lines>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Zero or more repetitions:-->
<line uuid="?" ctiid="?">
<!--Optional:-->
<index>?</index>
<!--Optional:-->
<label>?</label>
<!--Optional:-->
<asciiLabel>?</asciiLabel>
<!--Optional:-->
<display>?</display>
<!--Optional:-->
<dirn uuid="?">
<!--Optional:-->
<pattern>?</pattern>
<!--Optional:-->
<routePartitionName uuid="?">?</routePartitionName>
</dirn>
<!--Optional:-->
<ringSetting>?</ringSetting>
<!--Optional:-->
<consecutiveRingSetting>?</consecutiveRingSetting>
<!--Optional:-->
<ringSettingIdlePickupAlert>?</ringSettingIdlePickupAlert>
<!--Optional:-->
<ringSettingActivePickupAlert>?</ringSettingActivePickupAlert>
<!--Optional:-->
<displayAscii>?</displayAscii>
<!--Optional:-->
<e164Mask>?</e164Mask>
<!--Optional:-->
<dialPlanWizardId>?</dialPlanWizardId>
<!--Optional:-->
<mwlPolicy>?</mwlPolicy>
<!--Optional:-->
<maxNumCalls>?</maxNumCalls>
<!--Optional:-->
<busyTrigger>?</busyTrigger>
<!--Optional:-->
<callInfoDisplay>
<!--Optional:-->
<callerName>?</callerName>
<!--Optional:-->
<callerNumber>?</callerNumber>
<!--Optional:-->
<redirectedNumber>?</redirectedNumber>
<!--Optional:-->
<dialedNumber>?</dialedNumber>
</callInfoDisplay>
<!--Optional:-->
<recordingProfileName uuid="?">?</recordingProfileName>
<!--Optional:-->
<monitoringCssName uuid="?">?</monitoringCssName>
<!--Optional:-->
<recordingFlag>?</recordingFlag>
<!--Optional:-->
<audibleMwi>?</audibleMwi>
<!--Optional:-->
<speedDial>?</speedDial>
<!--Optional:-->
<partitionUsage>?</partitionUsage>
<!--Optional:-->
<associatedEndusers>
<!--Zero or more repetitions:-->
<enduser>
<!--Optional:-->
<userId>?</userId>
</enduser>
</associatedEndusers>
<!--Optional:-->
<missedCallLogging>?</missedCallLogging>
</line>
<!--Zero or more repetitions:-->
<lineIdentifier>
<!--Optional:-->
<directoryNumber>?</directoryNumber>
<!--Optional:-->
<routePartitionName>?</routePartitionName>
</lineIdentifier>
</lines>
<!--Optional:-->
<numberOfButtons>?</numberOfButtons>
<!--Optional:-->
<phoneTemplateName uuid="?">?</phoneTemplateName>
<!--Optional:-->
<speeddials>
<!--Zero or more repetitions:-->
<speeddial>
<!--Optional:-->
<dirn>?</dirn>
<!--Optional:-->
<label>?</label>
<!--Optional:-->
<asciiLabel>?</asciiLabel>
<!--Optional:-->
<index>?</index>
</speeddial>
</speeddials>
<!--Optional:-->
<busyLampFields>
<!--Zero or more repetitions:-->
<busyLampField>
<!--Optional:-->
<blfDest>?</blfDest>
<!--You have a CHOICE of the next 1 items at this level-->
<!--Optional:-->
<blfDirn>?</blfDirn>
<!--Optional:-->
<routePartition>?</routePartition>
<!--Optional:-->
<label>?</label>
<!--Optional:-->
<asciiLabel>?</asciiLabel>
<!--Optional:-->
<associatedBlfSdFeatures>
<!--Zero or more repetitions:-->
<feature>?</feature>
</associatedBlfSdFeatures>
<!--Optional:-->
<index>?</index>
</busyLampField>
</busyLampFields>
<!--Optional:-->
<blfDirectedCallParks>
<!--Zero or more repetitions:-->
<blfDirectedCallPark>
<!--Optional:-->
<label>?</label>
<!--You have a CHOICE of the next 2 items at this level-->
<!--Optional:-->
<directedCallParkId>?</directedCallParkId>
<!--Optional:-->
<directedCallParkDnAndPartition>
<!--Optional:-->
<dnPattern>?</dnPattern>
<!--Optional:-->
<routePartitionName uuid="?">?</routePartitionName>
</directedCallParkDnAndPartition>
<!--Optional:-->
<labelAscii>?</labelAscii>
<!--Optional:-->
<index>?</index>
</blfDirectedCallPark>
</blfDirectedCallParks>
<!--Optional:-->
<addOnModules>
<!--0 to 2 repetitions:-->
<addOnModule uuid="?">
<!--Optional:-->
<loadInformation special="?">?</loadInformation>
<!--Optional:-->
<model>?</model>
<!--Optional:-->
<index>?</index>
</addOnModule>
</addOnModules>
<!--Optional:-->
<userlocale>?</userlocale>
<!--Optional:-->
<defaultProfileName>?</defaultProfileName>
<!--Optional:-->
<currentProfileName uuid="?">?</currentProfileName>
<!--Optional:-->
<loginTime>?</loginTime>
<!--Optional:-->
<loginDuration>?</loginDuration>
<!--Optional:-->
<singleButtonBarge>?</singleButtonBarge>
<!--Optional:-->
<joinAcrossLines>?</joinAcrossLines>
<!--Optional:-->
<loginUserId uuid="?">?</loginUserId>
<!--Optional:-->
<ignorePresentationIndicators>?</ignorePresentationIndicators>
<!--Optional:-->
<dndOption>?</dndOption>
<!--Optional:-->
<dndRingSetting>?</dndRingSetting>
<!--Optional:-->
<dndStatus>?</dndStatus>
<!--Optional:-->
<emccCallingSearchSpace uuid="?">?</emccCallingSearchSpace>
<!--Optional:-->
<alwaysUsePrimeLine>?</alwaysUsePrimeLine>
<!--Optional:-->
<alwaysUsePrimeLineForVoiceMessage>?</alwaysUsePrimeLineForVoiceMessage>
<!--Optional:-->
<softkeyTemplateName uuid="?">?</softkeyTemplateName>
<!--Optional:-->
<callInfoPrivacyStatus>?</callInfoPrivacyStatus>
<!--Optional:-->
<currentConfig>
<!--Optional:-->
<userHoldMohAudioSourceId>?</userHoldMohAudioSourceId>
<!--Optional:-->
<phoneTemplateName uuid="?">?</phoneTemplateName>
<!--Optional:-->
<mlppDomainId>?</mlppDomainId>
<!--Optional:-->
<mlppIndicationStatus>?</mlppIndicationStatus>
<!--Optional:-->
<preemption>?</preemption>
<!--Optional:-->
<softkeyTemplateName uuid="?">?</softkeyTemplateName>
<!--Optional:-->
<ignorePresentationIndicators>?</ignorePresentationIndicators>
<!--Optional:-->
<singleButtonBarge>?</singleButtonBarge>
<!--Optional:-->
<joinAcrossLines>?</joinAcrossLines>
<!--Optional:-->
<callInfoPrivacyStatus>?</callInfoPrivacyStatus>
<!--Optional:-->
<dndStatus>?</dndStatus>
<!--Optional:-->
<dndRingSetting>?</dndRingSetting>
<!--Optional:-->
<dndOption>?</dndOption>
<!--Optional:-->
<alwaysUsePrimeLine>?</alwaysUsePrimeLine>
<!--Optional:-->
<alwaysUsePrimeLineForVoiceMessage>?</alwaysUsePrimeLineForVoiceMessage>
<!--Optional:-->
<emccCallingSearchSpaceName uuid="?">?</emccCallingSearchSpaceName>
<!--Optional:-->
<deviceName>?</deviceName>
<!--Optional:-->
<model>?</model>
<!--Optional:-->
<product>?</product>
<!--Optional:-->
<deviceProtocol>?</deviceProtocol>
<!--Optional:-->
<class>?</class>
<!--Optional:-->
<addressMode>?</addressMode>
<!--Optional:-->
<allowAutoConfig>?</allowAutoConfig>
<!--Optional:-->
<remoteSrstOption>?</remoteSrstOption>
<!--Optional:-->
<remoteSrstIp>?</remoteSrstIp>
<!--Optional:-->
<remoteSrstPort>?</remoteSrstPort>
<!--Optional:-->
<remoteSipSrstIp>?</remoteSipSrstIp>
<!--Optional:-->
<remoteSipSrstPort>?</remoteSipSrstPort>
<!--Optional:-->
<geolocationInfo>?</geolocationInfo>
</currentConfig>
<!--Optional:-->
<services>
<!--Zero or more repetitions:-->
<service uuid="?">
<!--Optional:-->
<telecasterServiceName uuid="?">?</telecasterServiceName>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<url>?</url>
<!--Optional:-->
<urlButtonIndex>?</urlButtonIndex>
<!--Optional:-->
<urlLabel>?</urlLabel>
<!--Optional:-->
<urlLabelAscii>?</urlLabelAscii>
<!--Optional:-->
<serviceNameAscii>?</serviceNameAscii>
<!--Optional:-->
<phoneService>?</phoneService>
<!--Optional:-->
<phoneServiceCategory>?</phoneServiceCategory>
<!--Optional:-->
<vendor>?</vendor>
<!--Optional:-->
<version>?</version>
<!--Optional:-->
<priority>?</priority>
</service>
</services>
<!--Optional:-->
<featureControlPolicy uuid="?">?</featureControlPolicy>
</returnedTags>
</ns:getDeviceProfile>
</soapenv:Body>
</soapenv:Envelope>
Now the <returnedTags> subtree controls what is returned. I was making some calls before and I was getting back all the values (Which is what I want) and then I went and made some changes (not sure what) and suddenly I started getting back only what I asked for.
Key for me is, what is the trick to get AXL to return all data it has on the object referenced, instead of explicitly listing them all in the request?
I.e. I would like a query as simple as:
<soapenv:Envelope xmlns:ns="http://www.cisco.com/AXL/API/8.5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns:getLine sequence="?">
<uuid>{02CF73CE-140E-AD9A-9E0E-B56134636D71}</uuid>
<returnedTags uuid="?"/>
</ns:getLine>
</soapenv:Body>
</soapenv:Envelope>
And get back all the data populated on the Line. But if I just included an empty <returnedTags/> tag I get back nothing. If I list of empty nodes to show the attrs I want, I get back those explicit ones. So what do I send to get all attributes returned?
although this question is more then a couple of months old, i'll give it shot anyway. Recently i have been put on a cisco axl project as well. I dont have that much experience yet, so i might be wrong.
I have been working with the getPhone and getUser request (as they are quite simple) and i get a fully populated result with a query a simple as this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getUser sequence="?">
<!--You have a CHOICE of the next 2 items at this level-->
<userid>ID</userid>
</ns:getUser>
</soapenv:Body>
</soapenv:Envelope>
So in other words: perhaps you could try and remove the from your request. It is completely optional as indicated by the WSDL.
In my wsdl:message i got two parameters, firstname and lastname:
<message name="setName">
<part name="firstname" type="xsd:string"></part>
<part name="lastname" type="xsd:string"></part>
</message>
I want to define the "firstname" part as required, and the "lastname" part as optional.
How do i do that?
In WSDL parts can not be optional. They are always required. If you need optional parts, you will have to create one part that refers to a XSD complexType that then can have optional elements.
You can add nullable to lastname, so firstname is required:
<message name="setName">
<part name="firstname" type="xsd:string"></part>
<part name="lastname" xsi:nil="true" type="xsd:string"></part>
</message>
If you do so, your soap body look like this (empty or filled lastname):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://www.example.com/MyService/">
<soapenv:Header/>
<soapenv:Body>
<user:setName>
<firstname>John</firstname>
<lastname></lastname>
</user:setName>
</soapenv:Body>
</soapenv:Envelope>
Or even without lastname:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://www.example.com/MyService/">
<soapenv:Header/>
<soapenv:Body>
<user:setName>
<firstname>John</firstname>
</user:setName>
</soapenv:Body>
</soapenv:Envelope>