on 07-30-2014 5:22 PM
Hi,
I am working with Manage Account i.e. ManageCustomerIn web service using VB.NET to create a private customer account. The response log displays a severity code of 3 and the note: "Only value true is permitted as telephoneListCompleteTransmissionIndicator". On WSDL telephoneListCompleteTransmissionIndicator is of type boolean, I have tried passing in 1 and even a string value of "true" but I just get the same response.
'Create a customer
Dim oQCust As New ManageAccounts.ManageCustomerInClient
oQCust.ClientCredentials.UserName.UserName = "xxxxx"
oQCust.ClientCredentials.UserName.Password = "xxxx"
oQCust.Open()
Dim oreadsync As New ManageAccounts.CustomerBundleMaintainRequestMessage_sync_V1
Dim customer As New ManageAccounts.CustomerMaintainRequestBundleCustomer_V1
customer.actionCode = ManageAccounts.ActionCode.Item01
customer.addressInformationListCompleteTransmissionIndicator = True
customer.bankDetailsListCompleteTransmissionIndicator = False
customer.communicationArrangementListCompleteTransmissionIndicator = True
customer.operatingHoursInformationListCompleteTransmissionIndicator = True
customer.paymentCardDetailsListCompleteTransmissionIndicator = True
customer.relationshipListCompleteTransmissionIndicator = True
customer.salesArrangementListCompleteTransmissionIndicator = True
customer.taxNumberListCompleteTransmissionIndicator = True
customer.generalProductTaxExemptionListCompleteTransmissionIndicator = True
customer.contactPersonListCompleteTransmissionIndicator = False
customer.paymentDataListCompleteTransmissionIndicator = True
customer.textListCompleteTransmissionIndicator = True
customer.CategoryCode = "1"
customer.ProspectIndicator = False
customer.CustomerIndicator = True
customer.LifeCycleStatusCode = ManageAccounts.PartyLifeCycleStatusCode.Item3
Dim person As New ManageAccounts.CustomerMaintainRequestBundlePerson
person.GivenName = "FirstName"
person.FamilyName = "LastName"
customer.Person = person
customer.LegalCompetenceIndicator = True
'Main Address
Dim address1 As New ManageAccounts.CustomerMaintainRequestBundleAddressInformation
address1.actionCode = ManageAccounts.ActionCode.Item01
address1.addressUsageListCompleteTransmissionIndicator = True
Dim address1usage As New ManageAccounts.CustomerMaintainRequestBundleAddressUsage
address1usage.actionCode = ManageAccounts.ActionCode.Item01
Dim usagecode1 As New ManageAccounts.AddressUsageCode
usagecode1.Value = "XXDEFAULT"
address1usage.AddressUsageCode = usagecode1
address1usage.DefaultIndicator = False
address1.AddressUsage = {address1usage}
Dim address1address As New ManageAccounts.CustomerMaintainRequestBundleAddress
address1address.actionCode = ManageAccounts.ActionCode.Item01
address1address.telephoneListCompleteTransmissionIndicator = True
Dim emailuri As New ManageAccounts.EmailURI
emailuri.Value = "xxxxxx@xxxxx.co.uk"
address1address.EmailURI = emailuri
Dim postaladdress1 As New ManageAccounts.CustomerMaintainRequestBundleAddressPostalAddress
postaladdress1.CountryCode = "GB"
postaladdress1.CityName = "Surrey"
postaladdress1.StreetPostalCode = "xxxxxxxx"
postaladdress1.StreetPrefixName = "xxxxxxx"
postaladdress1.StreetName = "xxxxxxx"
postaladdress1.StreetSuffixName = "xxxxxx"
postaladdress1.HouseID = "1"
address1address.PostalAddress = postaladdress1
Dim telephone As New ManageAccounts.CustomerMaintainRequestBundleAddressTelephone
telephone.FormattedNumberDescription = "+44 2222222222"
address1address.Telephone = {telephone}
address1.Address = address1address
'Shipping Address
Dim address2 As New ManageAccounts.CustomerMaintainRequestBundleAddressInformation
address2.actionCode = ManageAccounts.ActionCode.Item01
address2.addressUsageListCompleteTransmissionIndicator = True
Dim address2usage As New ManageAccounts.CustomerMaintainRequestBundleAddressUsage
address2usage.actionCode = ManageAccounts.ActionCode.Item01
Dim usagecode2 As New ManageAccounts.AddressUsageCode
usagecode2.Value = "SHIP_TO"
address2usage.AddressUsageCode = usagecode2
address2usage.DefaultIndicator = False
address2.AddressUsage = {address2usage}
Dim address2address As New ManageAccounts.CustomerMaintainRequestBundleAddress
address2address.actionCode = ManageAccounts.ActionCode.Item01
address2address.telephoneListCompleteTransmissionIndicator = True
Dim postaladdress2 As New ManageAccounts.CustomerMaintainRequestBundleAddressPostalAddress
postaladdress2.CountryCode = "GB"
postaladdress2.CityName = "Surrey"
postaladdress2.StreetPostalCode = "T35T"
postaladdress2.StreetPrefixName = "Delivery Address"
postaladdress2.StreetName = "xxxxxxxxx"
postaladdress2.StreetSuffixName = "xxxxxxxx"
postaladdress2.HouseID = "1"
address2address.PostalAddress = postaladdress2
address2.Address = address2address
customer.AddressInformation = {address1, address2}
Dim salesagg As New ManageAccounts.CustomerMaintainRequestBundleSalesArrangement
salesagg.SalesOrganisationID = "102"
Dim distcode As New ManageAccounts.DistributionChannelCode
distcode.Value = "Z1"
salesagg.DistributionChannelCode = distcode
salesagg.CompleteDeliveryRequestedIndicator = True
salesagg.CurrencyCode = "GBP"
customer.SalesArrangement = {salesagg}
oreadsync.Customer = {customer}
Dim resp = oQCust.MaintainBundle_V1(oreadsync)
If Not IsNothing(resp) Then
If Not IsNothing(resp.Customer) Then
For Each c In resp.Customer
Trace.Write("Internal Id", c.InternalID)
Trace.Write("UUID", c.UUID.Value)
Next
End If
If Not IsNothing(resp.Log) Then
Trace.Write("severity code", resp.Log.Item.First.SeverityCode)
Trace.Write("type id", resp.Log.Item.First.TypeID)
Trace.Write("note", resp.Log.Item.First.Note)
End If
End If
oQCust.Close()
I also tried SOAP UI to create the customer account and it worked fine but not through .NET
Any help is appriciated!
Here is exact code I use and it works you are missing the "telephoneListCompleteTransmissionIndicatorSpecified"
Address.telephoneListCompleteTransmissionIndicator = True
Address.telephoneListCompleteTransmissionIndicatorSpecified = True
if that does not work you should run Fiddler to see what exactly your application is passing to SAP... sometimes the Proxy code generation in .net can get messed up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks William,
I did not have telephoneListCompleteTransmissionIndicatorSpecidfied as part of my initial test xml that worked fine with SOAPUI. After I add this property through .Net, the error has changed so I can see it was required.
The new error is "CUSTOMER role for business partner 000000000001000456 missing", any suggestions on this?
I do not have that level of code I can provide you I would encourage you to look at the documentation in SAP . And also look into how .net proxy generation works... also use Fiddler to analyze you exact XML that is generated and compare that to what you are expecting to be generated.
Most of your data above is missing the ***IndicatorSpecified = True without this added to your Boolean (SAP Indicator Type) values, the value will not get added the the Generated SOAP XML via the ,net Proxy code. In the error above you are missing
CustomerIndicatorSpecified = True
Thanks William,
It works now. But when I tested it on SOAP UI I did not add the specified indicator and it still worked.
I am glad it's sorted now. I tried using fiddler but it was not displaying any xml captured, I will look deeper into making fiddler work and hopefully that will help me in future problems.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.