"required field 'EntityId' is missing" error - dynamics-crm

No matter what i attempt i keep getting the following exception being thrown by MSCRM 4.0
Invalid format of input XML for request SetStateITG_glcode: required field 'EntityId' is missing
here is the captured SoapEnvelope from WireShark going to MSCRM where you can see that there is in fact a EntityId element.
<s:Body><ns0:Execute xmlns:ns0="http://schemas.microsoft.com/crm/2007/WebServices" xmlns:ns3="http://microsoft.com/wsdl/types/" xmlns:ns4="http://schemas.microsoft.com/crm/2006/WebServices" xmlns:ns6="http://schemas.microsoft.com/crm/2006/Scheduling" xmlns:ns2="http://schemas.microsoft.com/crm/2006/CoreTypes" xmlns:ns5="http://schemas.microsoft.com/crm/2006/Query" xmlns:ns1="http://schemas.microsoft.com/crm/2007/CoreTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns0:Request xsi:type="ns0:SetStateITG_glcodeRequest"><ns0:OptionalParameters/><ns0:EntityId>f0754ebf-50d2-de11-93aa-000c29af16b6</ns0:EntityId><ns0:ITG_glcodeState>Active</ns0:ITG_glcodeState><ns0:ITG_glcodeStatus>1</ns0:ITG_glcodeStatus></ns0:Request></ns0:Execute></s:Body></s:Envelope>
here is SOAP body submitted to MSCRM captured again by Wireshark; this message came from a quick console application i wrote to do the update i am trying through my web service client above.
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Execute xmlns="http://schemas.microsoft.com/crm/2007/WebServices"><Request xsi:type="SetStateITG_glcodeRequest"><OptionalParameters/><EntityId>c2fcef74-19cf-de11-9376-000c29af16b6</EntityId><ITG_glcodeState>Inactive</ITG_glcodeState><ITG_glcodeStatus>-1</ITG_glcodeStatus></Request></Execute></s:Body>
the second message work; and MSCRM does what it is meant to do.
the first one, which other than the namespace prefixes, is the same structure ... as far as i can see.
am i missing something obvious?
what is MSCRM moaning about?
Thanks

so this problem is fixed...
turns out MSCRM didn't like the namespace prefix of ns0
is MSCRM using a custom string parsing based Xml vlaidator or something ridiculous?

Related

Trying to get primarycontactid of particular account in Dynamics 365 CRM through API and getting "Bad Request - Error in query syntax"

I'm sending a GET request to
{orgname}.crm.dynamics.com/api/data/v9.1/accounts(accountGuid)$select=_primarycontactid_value
and getting an error:
Bad Request - Error in query syntax
I'm using the query syntax I found here https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/247815/how-to-get-all-the-primary-contact-of-a-specific-account-through-api/688381
If I take off the $select parameter, I get a JObject with all of the attributes, I'm just not sure why the query syntax is wrong using that parameter. Any help is greatly appreciated.
Try this below as there is a typo in your snippet. Read more
{orgname}.crm.dynamics.com/api/data/v9.1/accounts(accountGuid)?$select=_primarycontactid_value
To avoid such errors, you can always use CRM REST builder to compose and test queries.
Note: I noticed it is not your mistake, I even corrected the snippet in original forum thread from Aric. :)

Esper AMQPSource not receiving events

I'm trying to use the AMQPSource and I'm getting the error describe below, also imports are not working in EPL module. In advance, I test adding full package name to DistanceEvent (events.DistanceEvent and does not work).
To sending a message i'm using the publish Rabbitmq webadmin queue option with the next payload:
{"distance":33}
Could anyone help me?
The "IO-error deserializing object" is the reason you are not seeing data.
The "AMQPToObjectCollectorSerializable" expects the AMQP message to carry a valid JVM-serialized object however the "invalid header" means that the message content cannot be read by the JVM. Check the sender making sure it produces a AMQP message with a JVM-serialized object or may use replace "AMQPToObjectCollectorSerializable" with a deserializer that can understand your message. The code for "AMQPToObjectCollectorSerializable" can be found in Github if your are not sure how it deserializes.

What is the GlobalIdentity and how do I set it in the FileNet web service?

I'm trying to upload a document into filenet via CEWS, but I'm getting this error:
“The unexpected exception is chained to this exception. Message was: com.filenet.apiimpl.core.GlobalIdentity incompatible with com.filenet.apiimpl.core.RepositoryIdentity“
Our Filenet people don't seem to know what that means. They've provided working code that basically looks the same as mine (but which I can't compile directly at the moment because it references parts of their project I don't have.)
So is the GlobalIdentity something I need to pass in through the web service? If so, how? If not, where is it configured?
Ok I finally spotted my mistake.
I had incorrectly set crt.TargetSpecification.classId to the name of the repository I was trying to use rather than to the correct classId.

SOAP WSDL accessible in SoapUI, not in Visual Studio

I'm attempting to integrate a SOAP web service into my C# project via "Add Service Reference," as I have done successfully at least once before. The address works normally in SoapUI, and even entering the address in a browser brings up the WSDL file as expected. But when I enter the address in the Add Service Reference dialog, it results in an error.
The document at the url [redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl was not
recognized as a known document type. The error message from each known type may help you fix the problem:
Report from 'XML Schema' is 'The root element of a W3C XML Schema should be and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
Report from 'DISCO Document' is 'Discovery document at the URL [redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl could
not be found.'.
The document format is not recognized.
Report from 'WSDL Document' is 'There is an error in XML document (2, 129).'.
The string 'http ://webservice.uesas._[redacted].webroot' is not a valid Uri value.
Metadata contains a reference that cannot be resolved: '[redacted].com/uesas/WebService/Onboard-2_0.cfc?wsdl'.
The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:
... followed by the first several lines of what is clearly HTML code, instead of WSDL code. So evidently, VS doesn't even SEE the WSDL file, even though SoapUI and any standard browser confirm it's there. Does anyone have any thoughts why this would be?
Add ?WSDL after the endpoint address like: http://localhost:8088/mock_service?WSDL

Missing WSDL error.. Trying to add functionality to an existing WSDL

I'm currently trying to add functionality to a WSDL.. I think I did all the changes necessary but after a Soap request I get an error. Out of curiosity I tried to test the original WSDL and it doesn't work anymore, I get the following fault:
<faultstring> Message part {urn:bar:foo}AddRequest was not recognized. (Does it exist in service WSDL?)</faultstring>
I know the request in question is there, but for some reason is not being recognized.
I reverted all changes in all files (hoping it was just a simple mismatch on the WSDL signature) but I didn't have much luck. any ideas?
I'm really new to all these technologies, any help is welcome.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mule-project xmlns="http://www.mulesoft.com/tooling/project" runtimeId="org.mule.servers.3.2.0.CE">
<name>cdms</name>
<description></description>
</mule-project>
I found the mistake, it was a very obvious thing too :#
I was using the wrong endpoint in soapUI call, so of course I was getting a response but by using the wrong endpoint Mule didn't recognized the WSDL and thus returned a fault

Resources