-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating Contacts in Outlook [Started development] #60
Comments
@trustrachel, @got-root, @ematthews could I ask you guys for input please? |
So sorry about the delay - I don't officially maintain this any more. :) I'm at a different company and don't have access to an Exchange server, so I can only give advice. So the error you're getting probably means the XML you're sending Exchange is either malformed or not correct, so Exchange is confused and doesn't know what to do. PyExchange is just passing on the error. The first thing to do is test sending the raw SOAP request by using this script. Just change the REQUEST string to whatever XML you're sending: https://gist.github.com/trustrachel/b70d79ea670f048ed165 If that doesn't work, then just fix as necessary and off you go. If it does work, let me know and I can dig more. thank you! |
@trustrachel no problem for the delay, I'm happy you took the time to respond. So thanks a lot for that 😄 How the testscript looks:
When I run this script I will get the following results back (so a succesfull creation):
Now, back to the code that I've added to the library, which you can find here: https://github.com/Yenthe666/pyexchange/blob/master/pyexchange/exchange2010/soap_request.py#L634-L683
I have no idea what is wrong with my code though.. Think you could have a look at it too? There must be something wrong. |
Aha, you're not sending the XML you expect. You see where you're setting the Try getting rid of that. If that still doesn't work, try upping the logging to debug and you should see exactly what's going over the wire to Exchange and what you're getting back. IIRC, Exchange will tell you if you have malformed XML. |
This is the one real flaw in using raw XML instead of a more heavyweight SOAP library, we don't get the benefit of XML schemas. 😞 |
@trustrachel thanks for the feedback, good catch there! I've removed the line
So, where exactly is the debugger level defined? I can't find it directly. And yep the debugging is horrid so it seems. Perhaps I should just go with the SOAP without using the library.. |
It's just using the standard Python logger - you set it in whatever script you're using to run pyexchange. The easiest thing is to just set the root logger to DEBUG, but I think you can just target pyexchange with logger.getLogger('pyexchange'). If you don't know how to do that, see this: https://docs.python.org/2/howto/logging.html#configuring-logging SOAP will also work, but I found that they're all either very slow or don't handle unicode. |
@trustrachel I finally had some time to look at it and found the fix. The problem was some HTML field that wasn't allowed there to be used in that way. 👍
Think you could have a look at this? I've made an issue on my own branch here: https://github.com/Yenthe666/pyexchange/issues/1 It looks to me like my self programmed Exchange2010ContactEvent class and Exchange2010FolderService are missing something or are doing something wrong. |
@trustrachel sorry to ping you again but could you have a look please? |
Hi guys,
Since this library had some amazing implementations and did a lot of the things I needed I decided to expand it and put some effort in to it.
I'm not used to anything related Exchange / SOAP but tried to manage with what was already here.
I've forked this repository and added as much as I could for now. You can see my added code here: master...Yenthe666:master
I've now ran stuck on the following error:
Which comes from exceptions.py in the function FailedExchangeException:
Example code to create a new contact:
Could anybody help me and finish this implementation? I do not know how to fix this issue but I think this is a good start.
The text was updated successfully, but these errors were encountered: