SQL Query pulling extra data - sql

I am using this query in SOAPUI against our SOAP API.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:del="http://tempuri.org/Deltek.Vision.WebServiceAPI.Server/DeltekVisionOpenAPIWebService">
<soapenv:Header/>
<soapenv:Body>
<del:GetProjectsByQuery>
<!--Optional:-->
<del:ConnInfoXML><![CDATA[<VisionConnInfo>
<databaseDescription>Description</databaseDescription>
<userName>USERNAME</userName>
<userPassword>PASSWORD</userPassword>
<integratedSecurity>Y</integratedSecurity>
</VisionConnInfo>]]></del:ConnInfoXML>
<!--Optional:-->
<del:Query>SELECT WBS1,Name,Principal FROM PR WHERE PR.WBS1='H15032.00'</del:Query>
<!--Optional:-->
<del:RecordDetail>'Project'</del:RecordDetail>
</del:GetProjectsByQuery>
</soapenv:Body>
</soapenv:Envelope>
The request goes through and gives me a response, however it gives me additional fields also. I just want to pull the column specified in query itself like WBS1, Name, and Principal fields only.
<WBS1>H15032.00</WBS1>
<Name>Name</Name>
<Principal>Principal Name</Principal>
<custLetterofIntent>Y</custLetterofIntent>
<custIssued>2015-06-03T00:00:00.000</c‌​ustIssued>
<CreateUser>KGOODENOW</CreateUser>
<CreateDate>2015-06-03T15:51:20.913</‌​CreateDate>
<ModUser>KGOODENOW</ModUser>
<ModDate>2015-06-03T15:52:29.227</ModDate>‌​
<CustContractStatus>LOI</CustContractStatus>
</ROW>
</Projects_ConsultantAgreements‌​>
</REC>
</RECS>]]>
</GetProjectsByQueryResult>
Am I missing something?

Related

Magento Customer Update API Error - Cannot use object of type stdClass as array

Hi Im am trying to connect to magento api Customer Update using SOAP UI. I perfectly connect and update products. I can list Customers
but for some reason I can not update a customer. The xml I am using is as follows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
<soapenv:Header/>
<soapenv:Body>
<urn:customerCustomerUpdateRequestParam>
<sessionId>65e47ee067bba9c51b97c8d80929a138</sessionId>
<customerId>1</customerId>
<customerData>
<email>33#ddd.com</email>
</customerData>
</urn:customerCustomerUpdateRequestParam>
</soapenv:Body>
</soapenv:Envelope>
And the response I get is the following:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Cannot use object of type stdClass as array</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can any one shed some light on this?
Thanks.

How to validate part of message in WSOESB and choose first?

Here is how it works.
I do have dss service that returns message of format
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dss="https://rmis33.r-mis.ru/services/dss">
<soapenv:Header/>
<soapenv:Body>
<dss:Requests>
<dss:Request>...</dss:Request>
<dss:Request>...</dss:Request>
<dss:Request>...</dss:Request>
....
<dss:Request>...</dss:Request>
</dss:Requests>
</soapenv:Body>
</soapenv:Envelope>
I have to split message on Request element and validate it, then choose first that pass validation over XSD.
It is hard to do on database level because it has a lot of elements(sub-elements) and XSD was already provided.
You can use validate mediator to validate XML messages against XML schema.There is a complete sample which demonstrates validating messages.

Error registering Yodlee user, can't getWrappedExceptions

I'm getting the following error (see Response) while attempting to register a user. The code was working fine before but it seems something changed.
Request:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:ns3="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns0="http://userregistration.usermanagement.core.soap.yodlee.com"
xmlns:ns1="http://common.soap.yodlee.com"
xmlns:ns2="http://login.ext.soap.yodlee.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns3:Body>
<ns0:register3>
<cobrandContext xsi:type="ns1:CobrandContext">
<cobrandId>8910005960</cobrandId>
<channelId>-1</channelId>
<locale>
<country>US</country>
<language>en</language>
</locale>
<tncVersion>2</tncVersion>
<applicationId>58EEA306454D869DFF721D0D00B82D00</applicationId>
<cobrandConversationCredentials xsi:type="ns2:SessionCredentials">
<sessionToken>05292013_0:718a0b8d870c13b5be2d2fb14bfd53b3796c5c97b401d68d34fe4594fdefeab3a3e5d6d8ee14696a6e03f53f0da613b781f1be0c8c06e70b883bb9abe232ba9f</sessionToken>
</cobrandConversationCredentials>
<preferenceInfo>
<currencyCode>USD</currencyCode>
<timeZone>PST</timeZone>
<dateFormat>MM/dd/yyyy</dateFormat>
<currencyNotationType>SYMBOL_NOTATION</currencyNotationType>
<numberFormat>
<decimalSeparator>.</decimalSeparator>
<groupingSeparator>,</groupingSeparator>
<groupPattern>###,##0.##</groupPattern>
</numberFormat>
</preferenceInfo>
<currencyCode>USD</currencyCode>
<timeZone>PST</timeZone>
<dateFormat>MM/dd/yyyy</dateFormat>
<currencyNotationType>SYMBOL_NOTATION</currencyNotationType>
<numberFormat>
<decimalSeparator>.</decimalSeparator>
<groupingSeparator>,</groupingSeparator>
<groupPattern>###,##0.##</groupPattern>
</numberFormat>
</preferenceInfo>
<fetchAllLocaleData>false</fetchAllLocaleData>
</cobrandContext>
<userCredentials xsi:type="ns2:PasswordCredentials">
<loginName>someyodleeuser#somedomain.com</loginName>
<password>yodleepasswordtest</password>
</userCredentials>
<userProfile>
<values>
<table>
<key xsi:type="xsd:string">EMAIL_ADDRESS</key>
<value xsi:type="xsd:string">someyodleeuser#somedomain.com</value>
</table>
</values>
</userProfile>
</ns0:register3>
</ns3:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>IllegalArgumentValueExceptionFaultMessage</faultstring>
<detail>
<ns4:IllegalArgumentValueExceptionFault xmlns:ns4="http://core.soap.yodlee.com">
<faultText>com.yodlee.core.IllegalArgumentValueException: Multiple exceptions encapsulated within: invoke getWrappedExceptions for details</faultText>
</ns4:IllegalArgumentValueExceptionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Problem is, I'm not getting back any details on the exception to debug the issue (Even when doing as suggested).
Your password is not in the right format and hence you are getting this error.
Below are the restrictions on username and password which you should follow -
UserName
>= 3 characters <= 150 characters
pNo Whitespace
No Control Characters
Contains at least one Letter
Password
>= 6 characters
<= 50 characters
No Whitespace
No Control Characters
Contains at least one Number
Contains at least one Letter
Does not contain the same letter/number three or more times in a row. (e.g. aaa123 would fail for three \"a\"'s in a row, but a1a2a3 would pass)"); Does not equal username

eBay API: GetOrders call returning no orders

I have placed test orders in the sandbox eBay account.
I am not able to get the orders listing from the GetOrders API call.
It retruns the success message but no orders are fetched.
Below are the API call details :
<?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/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:ebay:apis:eBLBaseComponents" ><soap:Header><RequesterCredentials><eBayAuthToken>...</eBayAuthToken><Credentials><AppId>Clarion89-2b36-4da6-b073-00dafbcff12</AppId><DevId>f79169c1-f95b-4d23-9fe2-547504ffb827</DevId><AuthCert>...</AuthCert></Credentials></RequesterCredentials></soap:Header><soap:Body><GetOrdersRequest><DetailLevel>ReturnAll</DetailLevel><Version>527</Version><CreateTimeFrom>2012-04-02T09:52:27.000Z</CreateTimeFrom><CreateTimeTo>2012-05-03T09:52:27.000Z</CreateTimeTo><OrderRole>Seller</OrderRole><OrderStatus>Active</OrderStatus><ListingType>FixedPriceItem</ListingType></GetOrdersRequest></soap:Body></soap:Envelope>
Response returned as below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetOrdersResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2012-05-03T09:54:03.650Z</Timestamp>
<Ack>Success</Ack>
<Version>771</Version>
<Build>E771_CORE_BUNDLED_14795207_R1</Build>
<PaginationResult>
<TotalNumberOfPages>0</TotalNumberOfPages>
<TotalNumberOfEntries>0</TotalNumberOfEntries>
</PaginationResult>
<HasMoreOrders>false</HasMoreOrders>
<OrderArray/>
<OrdersPerPage>100</OrdersPerPage>
<PageNumber>1</PageNumber>
<ReturnedOrderCountActual>0</ReturnedOrderCountActual>
</GetOrdersResponse>
</soapenv:Body>
</soapenv:Envelope>
Please tell me why i am not getting order details
first of all i would use an higher version (i'm actually using 771 as compatibility level)
I used to have a similar problem at the very benning when i started coded for api, then i switched CreatedTime filter to NumberOfDays wich are the days to look back from today.
What language are you using to make the call?
Check your request parameters against your orders that are stored on ebay. It may happen that there are no orders matching the parameters you are entering in your call. Try entering the most basic request parameters like
<?xml version="1.0" encoding="utf-8"?>
<GetOrdersRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[your authentication token]</eBayAuthToken>
</RequesterCredentials>
<CreateTimeFrom>2012-05-10T00:00:00.000Z</CreateTimeFrom>
<CreateTimeTo>2012-05-15T00:00:00.000Z</CreateTimeTo>
</GetOrdersRequest>
You can enter the dates as per your requirement but make sure you use the date format accepted by ebay.

Web Service returning definition of response with initial value set

So I have a simple webservice that has an input of a userid and gets a flag from a sql database (initially set to '1').
However, when I query a user with the default value of the flag (which I set to 1 in SQL Server), I get the following response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<result xsi:type="ns1:getPWFlagResponse" xsi:nil="1" xmlns:ns1="<NamespaceURL>"/>
</soapenv:Body>
</soapenv:Envelope>
However, if I change the value of the flag, I Get the correct response for all other requests:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<result>
<result>1</result>
</result>
</soapenv:Body>
</soapenv:Envelope>
(Same for result of 0 ).
I thought that it could be that I didn't initialize something at first, however if I don't set an initial value on the PWResetFlag column in the table the webService comes back with the correct response.
Is this something with SQL server and setting default values or something on my end?
Thanks
Just wanted to update the question in case anyone else has had similar problems, but I have found the root source of my problem. I was using TOAD for sql server to do my table alterations, but when I went on to the actual server and into the database, the flag was set to NULL as a default value despite me altering it to not accept nulls and applying a default value of 1.
I did the alterations directly in SQL Server on the machine which correctly applied the default value and now my webservice is working perfectly!
Thanks