I have not that much experience on webservices yet, and have run into a problem, that i cannot find a solution on
Hope someone can guide me in the right direction..
I have this SOAP webservice, that i call:
- $applicationWebService = New-WebServiceProxy -uri $NAVServiceURL -Credential $NAVServiceUserCreds -Namespace NAVPortal.Application
When i try to create a new entry through the create statement on the WEB service:
- $NewUserProfile = New-Object -TypeName NAVPortal.Application.UserPersonalizationCard
- $NewUserProfile.User_SID = "[USER GUID]"
- $NewUserProfile.User_ID = "[Domain\username]"
- $NewUserProfile.Profile_ID = "[ProfileID]"
- $applicationWebService.Create([ref]$NewUserProfile)
- Exception calling "Create" with "1" argument(s): "Cannot convert the "NAVPortal.Application.UserPersonalizationCard" value of type "NAVPortal.Application.UserPersonalizatio
- nCard" to type "NAVPortal.Application.UserPersonalizationCard"."
What i can se from the output of the Webservice, it should be right:
- <?xml version="1.0"?>
- -<definitions xmlns:tns="urn:microsoft-dynamics-schemas/page/userpersonalizationcard" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:microsoft-dynamics-schemas/page/userpersonalizationcard">
- -<types>
- -<xsd:schema targetNamespace="urn:microsoft-dynamics-schemas/page/userpersonalizationcard" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- -<xsd:complexType name="UserPersonalizationCard">
- -<xsd:sequence>
- <xsd:element name="Key" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="User_SID" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="User_ID" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="Profile_ID" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="Language_ID" type="xsd:int" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="Locale_ID" type="xsd:int" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="Time_Zone" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- <xsd:element name="Company" type="xsd:string" maxOccurs="1" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- +<xsd:complexType name="UserPersonalizationCard_List">
- +<xsd:simpleType name="UserPersonalizationCard_Fields">
- +<xsd:complexType name="UserPersonalizationCard_Filter">
- +<xsd:element name="Read">
- +<xsd:element name="Read_Result">
- +<xsd:element name="ReadByRecId">
- +<xsd:element name="ReadByRecId_Result">
- +<xsd:element name="ReadMultiple">
- +<xsd:element name="ReadMultiple_Result">
- +<xsd:element name="IsUpdated">
- +<xsd:element name="IsUpdated_Result">
- +<xsd:element name="GetRecIdFromKey">
- +<xsd:element name="GetRecIdFromKey_Result">
- -<xsd:element name="Create">
- -<xsd:complexType>
- -<xsd:sequence>
- <xsd:element name="UserPersonalizationCard" type="tns:UserPersonalizationCard" maxOccurs="1" minOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- +<xsd:element name="Create_Result">
Thanks on advance
/Graves